 |
 |
 |
Hi everyone,
In experimenting with XmlDataDocuments, I've come across a bit of a
head-scratcher-- likely because of my incomplete understanding of the
class.
I've run through the steps listed below successfully, excluding the last
step, which throws an exception.
That is, I've:
--Built a simple DataSet by hand with a three-column table and added a
few test records.
--Passed this DataSet into an XmlDataDocument constructor.
--Immediately saved the XmlDataDocument to a StringWriter.
--*Tried* to read the XML into a new DataSet, using the ReadXml method.
This is where I get hit with an exception, which says, "There are
multiple
root elements." The error originates in the ParseRoot() method of the
XmlTextReader class.
I never touched the XML generated by the XmlDataDocument's Save()
method, so
I'm not entirely sure what's wrong. It --appears-- the XmlDataDocument's
Save
method doesn't provide XML that a DataSet can read from. This is a little
counterintuitive to me; I mean, wouldn't it stand to reason that a DataSet
can load an XmlDataDocument's output?
I may be reading too much into this --I can always just copy the
XmlDataDocument's DataSet member to my DataSet, after all-- but I wondered
if I was
doing something wrong when saving the XML or loading it into the new
DataSet.
Thanks for the clarifications.
-Jim
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |