Add element to existing xml files

Questions about XML that are not covered by the other forums should go here.
abadishai1
Posts: 1
Joined: Wed Aug 26, 2020 7:07 pm

Add element to existing xml files

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Add element to existing xml files

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply