Importing xml

  • Thread starter Thread starter Ian Belcher
  • Start date Start date
I

Ian Belcher

Hi, I'm tring to import an xml file into Access 2003.
Within the file are several related tables, but when I
import the file, none of the tables are related.
E.g.
<Person>
<Name>Ian</Name>
<ShoppingItem>
<ItemName>Apple</ItemName>
</ShoppingItem>
</Person>
<Person>
<Name>Bob</Name>
<ShoppingItem>
<ItemName>Orange</ItemName>
</ShoppingItem>
<ShoppingItem>
<ItemName>Banana</ItemName>
</ShoppingItem>
</Person>

Provides me with two tables, Person and ShoppingItem.
Both tables are just a list of the elements (i.e. Person
has 1 field called Name with two rows, Ian and Bob.
ShoppingItem has 1 field called ItemName with three rows,
Apple, Orange and Banana)
Is there a way to import a file so I know that Ian bought
an apple and Bob bought an orange and a banana?

Thanks
Ian Belcher
 
I've had the same problem - even using an XSD (schema) definition where I
define the relationship between the two tables (one-to-many)... In the
primary table, the link to the secondary file looks like this in the XML
schema...

<xsd:element ref="Child_Table" minOccurs="0" maxOccurs="unbounded"/>

This looks fine if you look at the XML in an XML developmer such as Style
Studio XML Pro, but importing to Access it looses the relationship.

Interestingly enough, it does actually export the relationships to XML, but
doesnt seem to read them on the import.
 
Back
Top