I'm trying to convert a comma delimited text file into an XML document then apply a schema to the XML to ensure all the data coming in is of the proper format. I've been using the XmlCsvReader class (found on MSDN) to convert the text file into the XML document. The only problem I'm having is that the XmlCsvReader does not insert the xml declaration on the first line or the namespace in the root element of the new XML document. As a result, when I attempt to apply the schema, none of the elements are recognized.
How can I insert the XML declaration and the namespace into the new XML document?