954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

XML First Line Indent Problem

l am writing XML to a file.

Everything works fine, however if l view the XML source the first line is always indented.

Cant seem to figure out the cause.

Thankx in advance for the help

masocha
Light Poster
38 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

If you're writing an XSLT, whitespace typically either comes directly from the input document or while you're building the output tree. If you want to remove unwanted input whitespace from the input document and you want to make sure your output tree doesn't have any insignificant whitespace, use the strip-space and output instructions.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:strip-space elements="*" />
	<xsl:output method="xml" indent="no" />
	
	<!-- Your code -->
</xsl:stylesheet>
iceandrews
Junior Poster
185 posts since May 2010
Reputation Points: 10
Solved Threads: 30
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You