Need help with C# ReadXML and xml space = "preserve" problem

S

serge

I have an XML file with an XSD file. When i am reading the XML
file and putting its content into a DataSet I notice that the field that
has a single space character is being converted to a field with no
space character.

DataSet ds = new DataSet();
ds.ReadXmlSchema(Path.ChangeExtension(fileNameC , ".xsd"));

ds.ReadXml(fileNameC, XmlReadMode.ReadSchema);

ds.Tables[0].TableName = tableName;



What do i have to do in order for the C# code when it reads the

XML file, it keeps the white space characters as white space characters?

I tried adding space="preserve" in the XML file, i also added
whitespace="true"

or something like that in the XSD's column but with no success.



Can anyone help?



Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top