Reading in an XML File into a DataSet
-
I am trying to read an XML document into a .NET DataSet object. I used the XSD.EXE utility to generate a schema file for this XML document. This schema has re-ocurring elements that I would like to load as records into my DataSet. However, I only want to load certain child elements as fields into the DataSet record. Is there a way I can modify this schema file such that I can use the DataSet.ReadXml method to parse this XML file and create the proper table rows?? Thanks
-
I am trying to read an XML document into a .NET DataSet object. I used the XSD.EXE utility to generate a schema file for this XML document. This schema has re-ocurring elements that I would like to load as records into my DataSet. However, I only want to load certain child elements as fields into the DataSet record. Is there a way I can modify this schema file such that I can use the DataSet.ReadXml method to parse this XML file and create the proper table rows?? Thanks
I don't know if this is good way or not,
DataSet.ReadXML()
accept stream of XML or XML Text, with XML classes such asXMLReader
or XPath classes for XML first load your proper nodes into XMLReader or String and then pass this parameter intoDataSet.ReadXML()
. Mazy No sig. available now.