Q:

Omit XML Declaration in DataSet.WriteXMLSchema

i need to serialize a dataset in c# to xml for sending the data to a webservice. I cannot change the webservice so my code has to be changed to fit the requirements of the webservice.
I use dataset.WriteXmlSchema(stream) to write the schema and add dataset.WriteXml(stream) to add the data itself.
The result now looks like following:
<?xml version='1.0'?>
<xs:schema id='DocumentElement' xmlns='' xmlns:xs='http://www.w3.org/2001/XMLSchema' ...

Is there a chance to get rid of the <?xml version='1.0'?> declaration?
I need to encapsulate the XML result of the dataset into other xml data and the xml declation breaks the data i need to send. I didn't want to start with fuzzy string handling and i thought there must be something more straight forward.
Thanks
MadMaxapp

A:

There seems no way to omit the xml declaration. I've implemented some code to remove the first line of the xml. Not nice but it works.

