Page 1 of 1

Removing entiter few uncertain elements

Posted: Wed Sep 06, 2017 9:47 pm
by OiiiO
Hello everyone,

Today is the first day I found Oxygen could do much better works than using python to parsing XML Documents, So this is my situation and wondering how can I get most of this product:

There are bunch of XML files with many elements that I want to get ride of them in hoping to have a cleaner files.

for example, I want do remove <documents> and any possible other same naming format that might be there like <doc>, <Docs>. I could easily find:

Code: Select all

.*\n?
and replacing it with nothing while XPath be set for /articles/article[1]/documents[1]. sweet, BUT, how could I apply same goal when I'm not sure do I have either documents OR doc AND they are in different files AND directories AND I want to do same thing on another elements as well AND guest what? with possible different naming format.

I'm really hoping someone here can be a help since using Python or even SED are really complex in this situation for me and they took along time to do all of these.