Kamilek0617
asked on
XML Attribures to Elements
I have a pretty large XML file which looks like this:
<App action="A" id="2">
<BaseVehicle id="30218"/>
<Note>My Note</Note>
<Qty>1</Qty>
<PartType id="1684"/>
<MfrLabel>some label</MfrLabel>
<Position id="30"/>
<Part>12345</Part>
</App>
There may be more elements in the <app></app> but just giving an example here.
I am trying to convert this to:
<App action="A" id="2">
<BaseVehicle>30218</BaseVe hicle>
<Note>My Note</Note>
<Qty>1</Qty>
<PartType>1684</PartType>
<MfrLabel>some label</MfrLabel>
<Position>30</Position>
<Part>12345</Part>
</App>
So basically I am trying to convert attributes to elements. I have a lot of these XML files and they are pretty big. Anyone know of a simple way to do this? Maybe some software?
<App action="A" id="2">
<BaseVehicle id="30218"/>
<Note>My Note</Note>
<Qty>1</Qty>
<PartType id="1684"/>
<MfrLabel>some label</MfrLabel>
<Position id="30"/>
<Part>12345</Part>
</App>
There may be more elements in the <app></app> but just giving an example here.
I am trying to convert this to:
<App action="A" id="2">
<BaseVehicle>30218</BaseVe
<Note>My Note</Note>
<Qty>1</Qty>
<PartType>1684</PartType>
<MfrLabel>some label</MfrLabel>
<Position>30</Position>
<Part>12345</Part>
</App>
So basically I am trying to convert attributes to elements. I have a lot of these XML files and they are pretty big. Anyone know of a simple way to do this? Maybe some software?
ASKER
What's XSLT? how do I use this?
If you want a batch process to run over all your files and perform the XSLT,
I recommend that you download saxon
www.saxonica.com, home edition will do
I recommend that you download saxon
www.saxonica.com, home edition will do
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The answer is correct and tested
and all follow up questions have been fully answered
You have no reason to delete this question
and your argument is plain false
and all follow up questions have been fully answered
You have no reason to delete this question
and your argument is plain false
Open in new window