Automated Modify of a existing XML file... how to?

admin

Administrator
Staff member
Hi, I have few xml files with this format: it contains supplier info and a list of products.... but the products are not numbered (such as #1, #2, #3, etc) <Item>
<Quantity>12</Quantity>
<Code>20001318</Code>
<TotalPrice>27.12</TotalPrice>
</Item>

How can (or if is there a good tool to do that) batch number each item of the xml file? the result xml i wish to have is some like:
<Items>
<Item>
<ItemNumber>1</ItemNumber>
<Quantity>12</Quantity>
<Code>20001318</Code>
<TotalPrice>27.12</TotalPrice>
</Item>
<Item>
<ItemNumber>2</ItemNumber>
<Quantity>2</Quantity>
<Code>77701318</Code>
<TotalPrice>27.12</TotalPrice>
</Item>
<Item>
<ItemNumber>3</ItemNumber>
<Quantity>1</Quantity>
<Code>11111318</Code>
<TotalPrice>27.12</TotalPrice>
</Item>
</Items>

Thanks in advance
 
Back
Top