We have a current system that outputs an XML file which is in the following format:
<INVENTORY>
<ITEM>
<SERIALNUMBER>something</SERIALNUMBER>
<LOCATION>something</LOCATION>
<BARCODE>something</BARCODE>
</ITEM>
</INVENTORY>
I need to use this data to load into the standard .NET 2.0 grid. But the grid needs the XML to be in the following format:
<INVENTORY>
<ITEM serialNumber="something" location="something" barcode="something">
</ITEM>
</INVENTORY>
i.e. the child nodes of item need to be converted into attributes of the item node.
Does someone know how this can be done using XSLT?
Best Answer
That should work:
HTH