| guxu@hotmail.com 2005-09-30, 8:24 pm |
| I have one XML which contains data that would go in multiple tables. I
did an annotated schema file, but I could only get data into ONE of the
tables (TableM as shown below) and I get "The statement has been
terminated" error every time I tried to import the XML file. Nothing
was imported to the other two tables (Table1 and Table2). Anybody has a
clue?
Here is my XML file structure looks like
<tag1>..</tag1>
<tag2>..</tag2>
<table1 attrX1=.. attrX2 ...>
<table2 attrXX2=.. attrXX2 = ..>
<tag3>..</tag3>
....
Here is the schema structure
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xs:annotation>
<xs:appinfo>
<sql:relationship name="table1_R" parent="TableM" parent-key="ID"
child="table1" child-key="ID"/>
<sql:relationship name="table2_R" parent="TableM" parent-key="ID"
child="table2" child-key="ID"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="test" sql:relation="TableM">
<xs:complexType>
<xs:sequence>
<xs:element name="Tag1" type="xs:integer"/>
<xs:element name="Tag2" type="xs:integer"/>
<xs:element name="Tag3" type="xs:integer"/>
<xs:element name="Table1" sql:relation="Table1"
sql:relationship="Table1_R">
<xs:complexType>
<xs:attribute name="attrX1" type ...>
<xs:attribute name="attrX2" type ...>
</xs:complexType>
</xs:element>
<xs:element name="Table2" sql:relation="Table2"
sql:relationship="Table2_R">
<xs:complexType>
<xs:attribute name="attrXX1" type ...>
<xs:attribute name="attrXX2" type ...>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
|