|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Here is how to convert an XML document to a different enco
Hi Roger, > Its encoding can be changed to another encoding using this simple XSLT program: > --------------------------------------------------- > <?xml version="1.0"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0"> > > <xsl:output method="xml" > encoding="Shift_JIS"/> > > <xsl:template match="node()|@*"> > <xsl:copy> > <xsl:apply-templates select="node()|@*"/> > </xsl:copy> > </xsl:template> For what its worth, you could just do: <xsl:template match="/"> <xsl:copy-of select="."/> as there is no need to process the input a node at a time. Also, you might be interested in this post the other day about "node() | @*" vs "@* | node()" vs "@*, node()": http://markmail.org/message/srnwfokgwqnsmcwx (see Mike's reply too) -- Andrew Welch http://andrewjwelch.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








