XSLT Display Serial number

Jorgando

New Member
My input XML consists of the following,\[code\]<root> <entry> <type>U</type> <value>111</value> </entry> <entry> <type>X</type> <value>222</value> </entry> <entry> <type>E</type> <value>333</value> </entry> <entry> <type>Q</type> <value>444</value> </entry></root>\[/code\]Output i required, \[code\]<ROOT>\[/code\] \[code\]<ENTRY>\[/code\] \[code\]<SLNO>1</SLNO>\[/code\] \[code\]<VALUE>111</VALUE>\[/code\] \[code\]</ENTRY>\[/code\] \[code\]<ENTRY>\[/code\] \[code\]<VALUE>222</VALUE>\[/code\] \[code\]</ENTRY>\[/code\] \[code\]<ENTRY>\[/code\] \[code\]<VALUE>333</VALUE>\[/code\] \[code\]</ENTRY>\[/code\] \[code\]<ENTRY>\[/code\] \[code\]<SLNO>2</SLNO>\[/code\] \[code\]<VALUE>444</VALUE>\[/code\] \[code\]</ENTRY>\[/code\] \[code\]</ROOT>\[/code\]I need to parse all the records, but need to put serial number for records whose type is not X and E.I have written a for-each to for the same and used
 
Back
Top