I'm having difficulty properly importing XML into a MySQL database (using Navicat), and wanted to know if there is anyway around this. Here is the issue, I have an XML file containing name and address data, there is ship to, as well as, bill to address, and Navicat is treating the file as though there is only a single kind of address, despite there being a 'type' identifier in the address tag (for instance, with the below example, Navicat will run through the XML file, and it will write the latter address information into DB tables, rather than looping through and writing out 2 separate entires for address - as I'm trying to write this into a completely flat table).
Is there a way to configure Navicat or my table to handle this properly so that bth addresses get brought into the table?
Here is the sample XML:
<Order>
<AddressInfo type="ship">
<First>John</First>
<Last>Smith</Last>
<Address1>123 Main Street</Address1>
<City>Your Town</City>
<State>FL</State>
<Country>US United States</Country>
<Zip>12345</Zip>
</AddressInfo>
<AddressInfo type="bill">
<First>Brad</First>
<Last>Dean</Last>
<Address1>532 Main Street</Address1>
<City>This Town</City>
<State>NY</State>
<Country>US United States</Country>
<Zip>10025</Zip>
</AddressInfo>
</Order>