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

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 -->