Page 1 of 1

Add element to existing xml files

Posted: Wed Aug 26, 2020 7:10 pm
by abadishai1
Hi,
How can I add an element for several xml files in bulk in the beginning of each file and in the end. For example:

Add <Import> in the beginning of each file and </import> in the end of each file

Thanks

Re: Add element to existing xml files

Posted: Thu Aug 27, 2020 6:02 pm
by adrian
Hi,

In Oxygen, if you want to wrap the root element of each XML file in a different element you can use Tools > XML Refactoring, Wrap element,
XPath: /*
Local name: import
Namespace: <NO_NAMESPACE>

Regards,
Adrian