xslt can output xml as well as html
you can use the xslt sort example:
Given the XML
<document>
<section num="3"/>
<section num="4"/>
<section num="2"/>
<section num="1"/>
</document>
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:copy>
<xsl:apply-templates select="section">
<xsl:sort data-type="number" order="ascending" select="section[@num]"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates match=
</xsl:copy>
</xsl:template>
should give return an xml file with the section elements ordered numberically in ascending order by the num attribute of each of those elements when passed through a xslt parser like salbot.
Hope this helps
news_friend wrote:
But I want the input as a XML file and the output also should be a xml file with the sorted nodes