acquiredtaste
MIS
I am trying to transform a xml file into another xml file.
Specifically:
<magazine>
<magazinename>
<magazinevolume>Mag Volume</magazinevolume>
<magissue>FirstIssue </magissue>
<magcover>"image.gif"</magcover>
<maglink>"page.php?XX"</maglink>
</magazinename>
</magazine>
I need to turn into another xml file:
<cover>
<coverimage picture="<magcover>" link="<maglink>"></coverimage>
...repeat for each <magazinename>...
</cover>
I know how to go from XML to XHTML, but I don't understand how to loop through the elements and turn them into attributes in a different node.
Thank you
Specifically:
<magazine>
<magazinename>
<magazinevolume>Mag Volume</magazinevolume>
<magissue>FirstIssue </magissue>
<magcover>"image.gif"</magcover>
<maglink>"page.php?XX"</maglink>
</magazinename>
</magazine>
I need to turn into another xml file:
<cover>
<coverimage picture="<magcover>" link="<maglink>"></coverimage>
...repeat for each <magazinename>...
</cover>
I know how to go from XML to XHTML, but I don't understand how to loop through the elements and turn them into attributes in a different node.
Thank you