quiq

quiq

  • NA
  • 1
  • 0

.NET [Compact, XML] Create Empty Dataset

Mar 31 2004 8:25 AM
Hello, I write some program for iPaq using C# and ADO .NET. I store all data in XML files. I have separated XSD and XML, so I read XSD of a dataset at first and then I load XML files of individual tables as I actually need. But when I don't have an apropriate XML file I want to create a new empty table using definition written in XSD.... and it's not possible..... the only way how to achieve this, I have found, is: ----------------------------------------------------------- NameTable nt = new NameTable(); XmlNamespaceManager nsmgr = new XmlNamespaceManager(nt); XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); XmlTextReader xmlr = new XmlTextReader("AB",XmlNodeType.Document,context); fdsGlobals.ReadXml(xmlr); xmlr=null; dt=fdsGlobals.getTable("CONFIG"); dt.Clear(); ---------------------------------------------------------------------------- where the xml text defines one dummyrow with a structure corresponding to a structure of "CONFIG" in XSD . this dummy row is removed by dt.Clear() the problem is that the structure of "Configure" table is in XSD an also in this dummy string... Any suggestions Thanks for comments in advance