Reading a DataSet from XML, Ignoring Schema Information


Reading a DataSet from XML, Ignoring Schema Information

If you have a DataSet with a schema already loaded, you might want to read XML data without reading the schema associated with the XML. To read XML into a DataSet and ignore the schema information in the XML, call DataSet.ReadXml(XmlReader, XmlReadMode) , and pass XmlReadMode.IgnoreSchema as an argument. For example:

 
 C# l_XmlTextReader = new System.Xml.XmlTextReader(new         System.IO.StreamReader("\MIGHT_HAVE_SCHEMA.xml.xml")); l_DataSet.ReadXml(l_XmlTextReader, XmlReadMode.IgnoreSchema); l_XmlTextReader.Close(); VB l_XmlTextReader = new System.Xml.XmlTextReader(new         System.IO.StreamReader("\MIGHT_HAVE_SCHEMA.xml.xml")) l_DataSet.ReadXml(l_XmlTextReader, XmlReadMode.IgnoreSchema) l_XmlTextReader.Close() 


Microsoft.NET Compact Framework Kick Start
Microsoft .NET Compact Framework Kick Start
ISBN: 0672325705
EAN: 2147483647
Year: 2003
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net