MySQL Forums
Forum List  »  Connector/Node.js

Re: XML output format
Posted by: Dan Clarke
Date: January 13, 2006 06:34PM

I developed an XSLT stylesheet to transform from the new (5.0) XML format to the old one (4.1 and earlier). Here it is:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">;
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">
<xsl:text disable-output-escaping="yes">&lt;resultset&gt;</xsl:text>
<xsl:text disable-output-escaping="yes">&lt;/resultset&gt;</xsl:text>

<xsl:template match="row">
<xsl:text disable-output-escaping="yes">&lt;row></xsl:text>
<xsl:text disable-output-escaping="yes">&lt;/row></xsl:text>

<xsl:template match="field">
<xsl:text disable-output-escaping="yes">&lt;</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes">&lt;/</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text>


Options: ReplyQuote

Written By
January 10, 2006 12:09PM
January 10, 2006 06:23PM
January 11, 2006 10:16AM
December 01, 2006 03:49PM
January 11, 2006 10:56AM
Re: XML output format
January 13, 2006 06:34PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.