RE: [Visual-XSLT-discuss] Formatting/pretty-printing xml/xsl in the editor
by Stuart Celarier other posts by this author
Jan 7 2003 11:10PM messages near this date
view in the new Beta List Site
Re: [Visual-XSLT-discuss] Formatting/pretty-printing xml/xsl in the editor
|
[Visual-XSLT-discuss] different result betwen Visual-XSLT and MSXSLT?
Taras,
One simple workaround to get XML into a human readable format is to use
XSLT. Here is a simple variation on the identity transform.
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates match="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:transform>
Run your XML through this transformation, save that to a file, and then
work with the reformatted XML. Or use a macro in VS.NET. This does have
its limitations, as noted in the XSLT spec regarding indent="yes" and
mixed content elements, but I find it pretty useful nonetheless.
Cheers,
Stuart
Thread:
Taras Tielkes
Taras Tielkes
Taras Tielkes
Eric Promislow
Eric Promislow
Stuart Celarier
|