I have an xml file i’m receiving and i want to format it using xsl.But the requirement is to
grab the elements and print them out in the order i recieve the xml file.
Looking at the sample below the first special element has got an order element and then the next one doesn’t have one and the third one has one.
So i want the output exactly that way.
Thanks i nAdvance
<main>
<submain>
<detail>
<specials>
<spec-qty>1</spec-qty>
<spec-desc> Receivable </spec-desc>
</specials>
<order>
<text>Test</text>
</order>
<specials>
<spec-qty>-1</spec-qty>
<spec-desc>Receivable1 </spec-desc>
</specials>
<specials>
<spec-qty>-1</spec-qty>
<spec-desc> Receivable2 </spec-desc>
</specials>
<order>
<text>Test2</text>
</order>
</detail>
</submain></main>
Output should be:
qty 1 Receivable order:Test qty -1 Receivable1 qty -1 Receivable2 order: Test2
Thanks and sorry for the previous uncompleted code
You can use this template:
Output: