Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet.ReadXml()
Message
From
11/11/2005 18:14:12
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01067978
Message ID:
01067980
Views:
14
Einar,

Have you looked at the second paramater of the ReadXML() method? Look into XmlReadMode and see if that helps.

~~Bonnie




>I am having a hard time understanding this (might be because it is Friday afternoon <s>).
>
>I have a dataset with one table (the table has defined columns but no rows). I wish to populate the dataset with data from an XML file (with an inline schema).
>
>Something like this:
>
>oDS.ReadXML("myXml.xml");
>
>
>This works just fine as long as the XML file has the same inline schema as the dataset that I am trying to read into, but lets say I am trying to read an XML file with a different inline schema into my dataset. I expected exceptions to be thrown but instead no exceptions were thrown and no data is read into the dataset.
>Is there a way to know if an "invalid" XML file is attempted to be read into a dataset?
>
>I guess I can check if the table row count is zero, but that could also mean other things.
>
>Any info (relevant that is <s>) would be appreciated.
>
>Thanks,
>Einar
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform