This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes How to write the xsl for this... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to write the xsl for this..." Watch "How to write the xsl for this..." New topic
Author

How to write the xsl for this...

Avi Nash
Ranch Hand

Joined: Jul 17, 2003
Posts: 69
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

Joined: Jan 27, 2004
Posts: 71
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to write the xsl for this...