How do I get around the "The same table (xxxx) cannot be the child table in two nested relations" error?
I bet this is a schoolboy problem but even the mighty google
is not helping. I am trying to read chunks of DMOZ RDF xml
into a dataset.
I am getting a "The same table
(xxxx) cannot be the child table in two nested relations."
error which I think I can sort out by doing a XSL transform
.. which is where I am stuck.
What I am doing
is
Dim DS As DataSet = New DataSet
DS.ReadXml(MapPath("xml/" + Request("x") + ".xml"))
DataGrid1.DataSource = DS.Tables("externallinks")
DataGrid1.DataBind()
DS = Nothing
How
do I wedge in a transform to take out the offending relation
before I do the ReadXml statement?
The XSL
examples I see online either output to a file or use methods
that VS is telling me is obselete :O(
Because these subordinate tags appear in multiple nested relations it barfs on it.
I could use a regular expression I guess but
A) I will
not know ahead of time what might be dropped in (eg. a xhtml
tag like <p/> dropped in anywhere will do the same
thing if not
enclosed in CDATA)
B) It's an
opportunity to learn :O)
This seemed close
http://aspalliance.com/article
But uses obsolete methods and does the
transform after loading into ds, I need to do before and do
it in memory as I do not want to create
files.
Actually I just want to display it but rest of
code is fine so figure just need to get around the problem
rather than redevelop it.
Anyone out there got any solutions? :O)