I have an xml file and xsl for it.
When I execute the command
msxml input.xml input.xsl -o output.xml
my output.xml is without indentation. All nodes are in the same line. How can I fix it?
Can you edit the XSLT? Then add
<xsl:output indent="yes"/>
Here is a more complete example:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes"/> <xsl:template match="/">...</xsl:template> </xsl:stylesheet>
Unfortunately, MSXML 6's idea of indentation is putting all lines at the same width. Setting indent to 'no' in your XSL file will result in a one-line file.
Can you edit the XSLT? Then add
Here is a more complete example: