Subject: Re: [xsl] How to insert Root Element in XML Output From: "Jon Gorman" <jonathan.gorman@xxxxxxxxx> Date: Wed, 3 May 2006 08:49:50 -0500 |
Hi. Newbie here. I have an XSL Stylesheet that produces XML as output. How do I code the XSL sheet to add a Root Element to the outputted XML document? Below is an example of the current XML output and the desired XML output with the root element <foo>. Thanks. Gary
Ummm.... <xsl:template match="/"> <foo> <xsl:apply-templates /> </foo> </xsl:template>
/ matches the "top" of the document. This wraps all the elements, even the root element.
You might want to browse through the XPath specs for more info: http://www.w3.org/TR/xpath
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] How to insert Root Element in, Gary E. Daniels | Thread | Re: [xsl] How to insert Root Elemen, MrDemeanour |
[xsl] How to insert Root Element in, Gary E. Daniels | Date | Re: [xsl] How to insert Root Elemen, MrDemeanour |
Month |