muj0i
12-19-2007, 10:06 PM
Hello...
I'm newbie with xml transformation and XSLT. Could there be anyone who can give me a simple example of transforming an xml to another xml.
I see samples from the internet but it transforms an xml to an html. I have read some tutorials online too but i still find it difficult to create an xml file that can do the transformation. please help :(
ex. old xml
<Item>
<Stocks>
<Apple>00</Apple>
<Banana>89</Banana>
<Bread>12</Bread>
<Juice>11</Juice>
</Stocks>
</Item>
new xml
<ItemsInStock>
<Banana>eightyNine</Banana>
<Bread>12more</Bread>
<Juice>11</Juice>
</ItemsInStock>
I know it looks weird. I just dont know how to produce an xml with new tags not existing from the previous xml file. Also, how to include exisitng xml tags as well. Sorry for my weird sample. Hope someone can help. tnx
I'm newbie with xml transformation and XSLT. Could there be anyone who can give me a simple example of transforming an xml to another xml.
I see samples from the internet but it transforms an xml to an html. I have read some tutorials online too but i still find it difficult to create an xml file that can do the transformation. please help :(
ex. old xml
<Item>
<Stocks>
<Apple>00</Apple>
<Banana>89</Banana>
<Bread>12</Bread>
<Juice>11</Juice>
</Stocks>
</Item>
new xml
<ItemsInStock>
<Banana>eightyNine</Banana>
<Bread>12more</Bread>
<Juice>11</Juice>
</ItemsInStock>
I know it looks weird. I just dont know how to produce an xml with new tags not existing from the previous xml file. Also, how to include exisitng xml tags as well. Sorry for my weird sample. Hope someone can help. tnx