Hi i do have following xml code: Then i need to convert those xml to csv format with header title is show.
<?xml version='1.0'?>
<portfolio>
<stock exchange="nasdaq">
<name>zaffymat inc</name>
<symbol>ZFFX</symbol>
<price>92.250</price>
</stock>
<stock exchange="nyse">
<name>zacx corp</name>
<symbol>ZCXM</symbol>
<price>28.875</price>
</stock>
<stock exchange="nasdaq">
<name>zysmergy inc</name>
<symbol>ZYSZ</symbol>
<price>20.313</price>
</stock>
</portfolio>
How can i transform xml above to csv like below output via xsl?
"Name";"Price"
"zaffymat inc";"92.250"
"zysmergy inc";"20.313"
Thank you.
Try this XSLT to get your desired output:
This is my last script:
Its work fine to filter out the info and making new line for csv output! =)