Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XmlDataDocument
Message
From
28/08/2006 14:20:23
 
 
To
28/08/2006 14:15:32
General information
Forum:
ASP.NET
Category:
XML
Title:
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01148739
Message ID:
01149119
Views:
13
You're welcome, Rick. Have fun! =)

~~Bonnie



>Thanks Bonnie. I think that is the way I will go.
>
>Rick
>>Rick,
>>
>>That would still work just fine by reading the XML file with the DataSet.ReadXml("MyXmlFile") method. As long as the XML you receive is standard XML, there's no reason to use the XmlDataDocument class. Everything can be done via the DataSet and it's methods.
>>
>>~~Bonnie
>>
>>
>>
>>
>>>Bonnie:
>>>
>>>Yes I have thought about doing that, and may ultimately adopt that as the strategy. The reason I was interested in the XmlDataDocument is that I am storing local configuration and operational data in an XML file which often gets updated by a Web Service. I read the XML data into a DataSet and then perform operations using the data and change the data before saving it for later use to the XML document. The easy interaction of the XML file and the DataSet was what attracted me to the XmlDataDocument. Because the XML file gets updated remotely, I don't want to use a schema with it since that would make incremental updates and changes to the XML document more complicated.
>>>
>>>Rick
>>>>Rick,
>>>>
>>>>Rather than mess with the XmlDataDocument class, have you tried simply reading the XML file directly with the DataSet's ReadXml() method?
>>>>
>>>>MyTypedDataSet ds = new MyTypedDataSet();
>>>>ds.ReadXml(MyXmlFile);
>>>>
>>>>
>>>>~~Bonnie
>>>>
>>>>>I am trying to synchronize an XML file with a DataSet. As such I am trying to use the XmlDataDocument class. I have a strongly typed DataSet but do not want to use a schema with the XML file. Unfortunately, when I load the XML into the XmlDataDoc I can see the tables, but not any rows in the tables. Am I doing something wrong here or do I have to have a schema with the XML file for this to work? BTW it does work with the schema but as soon as I remove the reference to the schema from the XML document I stop seeing the data rows.
>>>>>
>>>>>Thanks
>>>>>
>>>>>Rick Grinter
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform