E
Erik Reiter
I have an xml document that was created with infopath and I am trying to read
it with the following lines of code:
XmlDataDocument doc = new XmlDataDocument();
doc.Load(fileName);
return doc.DataSet;
or
DataSet SnippetLibraryDataSet = new DataSet();
SnippetLibraryDataSet.ReadXml(fileName, XmlReadMode.InferSchema);
return SnippetLibraryDataSet;
My goal it to get to a couple of the tables in the file.
I get the following error:
System.ArgumentException: The same table (font) cannot be the child table in
two nested relations.
at System.Data.DataRelation.CheckNestedRelations()
at System.Data.DataRelation.set_Nested(Boolean value)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlDocument xdoc, String[]
excludedNamespaces)
at System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode mode,
Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName, XmlReadMode mode)
I also get a similar error with div instead of font.
Thanks,
Erik
it with the following lines of code:
XmlDataDocument doc = new XmlDataDocument();
doc.Load(fileName);
return doc.DataSet;
or
DataSet SnippetLibraryDataSet = new DataSet();
SnippetLibraryDataSet.ReadXml(fileName, XmlReadMode.InferSchema);
return SnippetLibraryDataSet;
My goal it to get to a couple of the tables in the file.
I get the following error:
System.ArgumentException: The same table (font) cannot be the child table in
two nested relations.
at System.Data.DataRelation.CheckNestedRelations()
at System.Data.DataRelation.set_Nested(Boolean value)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlDocument xdoc, String[]
excludedNamespaces)
at System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode mode,
Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName, XmlReadMode mode)
I also get a similar error with div instead of font.
Thanks,
Erik