• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to write the xsl for this...

 
Avi Nash
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
How to write the xsl for this data in xml:
<Node>
<A>a1</A>
<B>b1</B>
<A>a2</A>
<B>b2</B>
<A>a3</A>
<B>b3</B>
.......
.......
</Node>
I want the output xml (after applying the xsl) to be:
<A>a1</A>
<B>b1</B>
<A>a2</A>
<B>b2</B>
<A>a3</A>
<B>b3</B>
........
........
Help required Imme. Thanks in advance.
-Avinash
 
Nimchi Yung
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl utput method="xml" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="/Node/*">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

--Nimchi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic