Information générale
Catégorie:
The Mere Mortals .NET Framework
Bill,
I don't know about the Mere Mortals Framework, but you can read XML into a
DataSet very easily w/ the .NET Framework.
DataSet ds = new DataSet();
ds.ReadXml("filename.xml", XmlReadMode.InferSchema);
ds.AcceptChanges();
If you have a large XML that you are reading, you want to create and add an XML Schema to the project, because reading it will be MUCH, MUCH faster.
You can create a Schema like this.
DataSet ds = new DataSet();
ds.ReadXml("filename.xml", XmlReadMode.InferSchema);
ds.WriteXmlSchema("file.xsd");
You can then, add the XSD to your project, and have Visual Studio .NET generate a DataSet and you will use a typed DataSet
MyDataSet ds = new MyDataSet();
ds.ReadXml("filename.xml");
I hope that helps.
Morgan
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement