Anil Jayanti

pls suggest how to remove header < xml version="1.0" > tag in .xml file.


Re: XML and the .NET Framework how to remove <?xml version="1.0" ?> in .xml file

Alok.Ganguly

Can you pls give details, what exactly you want to do with xml file if you are using xslt then use below attributes

'<xslOutput method="xml" omit-xml-declaration="yes" /> in the xslt file.

visit http://www.dnzone.com/forum/topic.asp topic_id=228

hope give u some insight.






Re: XML and the .NET Framework how to remove <?xml version="1.0" ?> in .xml file

Anil Jayanti

i'm getting the values from database and creating the .xml file writing with

XmlTextWriter. after creating of .xml file i want to omitt the line < xml version="1.0" > in the header of the file.





Re: XML and the .NET Framework how to remove <?xml version="1.0" ?> in .xml file

Martin Honnen

If you are using XmlTextWriter or XmlWriter and don't want the XML declaration then don't call the WriteStartDocument method as that is what writes the XML declaration. Simply call a WriteStartElement method to write the start tag of your root element.