473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

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

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


Nov 17 '05 #1
0 1642

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ellen K. | last post by:
In a previous post I mentioned having a problem getting leading spaces to be written to SQL Server using OPENXML. They showed up fine in my XML documents if I printed them, but not in my database....
3
by: Ray Tayek | last post by:
hi, trying to use an xslt to make an xslt. trying something like: <?xml version="1.0" encoding="UTF-8"?> <?xmlspysamplexml H:\java\projects\spy1\spy\inputDocumentMap.xml?> <xsl:stylesheet...
5
by: Clifford W. Racz | last post by:
Has anyone solved the issue of translating lists in Word 2003 (WordML) into xHTML? I have been trying to get the nested table code for my XSLT to work for a while now, with no way to get the...
0
by: Tom Jastrzebski | last post by:
Hello everybody, It looks like this is a known problem, but I found no solution. Deserialization of DataSet object from XML does not preserve white space. The same code executed under .Net...
0
by: Jan Keller | last post by:
Hello all, I am using an XmlTextReader and a DataSet to populate a DataGrid: ds = New DataSet xr = New XmlTextReader(path) ds.ReadXml(xr) xr.Close() dv = New DataView(ds.Tables.Item(0))
0
by: serge | last post by:
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...
3
by: adgnews | last post by:
I have a problem converting a program from Vb.net VS2003 to VS2005. I process a xml-file with an inline schema. In 2003 no problem. In 2005 I have 2 problems: 1) BIG space="preserve" problem....
2
by: Lloyd Dupont | last post by:
I am "defining" an XML schema. In fact I'm not really writing any schema but I am writing an XML writer and reader for my data. It's all custom XML and I would like it to be XML tool friendly. ...
1
by: Miggiddy79 | last post by:
Does any body know how to fix this. I am trying to validate these html codes through the markup validation. I have 5 error messages: 1) Line 114, Column 15: there is no attribute "BACKGROUND" ....
8
by: howa | last post by:
Just found a funny things.. in HTML4's dtd, http://www.w3.org/TR/html4/strict.dtd language is not valid, i.e. <!ELEMENT SCRIPT - - %Script; -- script statements --> <!ATTLIST...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.