Forum Moderators: open

Message Too Old, No Replies

Automated Modify of a existing XML file. how to?

         

sugar2

11:40 pm on Mar 8, 2006 (gmt 0)

10+ Year 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

sugar2

7:07 pm on Mar 11, 2006 (gmt 0)

10+ Year Member



well... finally the problem was solved using xsl styling

thaks anyway