Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[access 2003] importing xml file to database

Status
Not open for further replies.

pit977

Technical User
Feb 28, 2011
6
hi,

I would like to import following xml file to dtabase to table Orders:

xml file:

<?xml version="1.0" encoding="utf-8" ?>
<orders>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<compound>
<name>Riboflavorific</name>
<amount>27</amount>
</compound>
<compound>
<name>Reduxicon</name>
<amount>90</amount>
</compound>
<compound>
<name>Photicuderm</name>
<amount>70</amount>
</compound>
<compound>
<name>Polysitorum</name>
<amount>99</amount>
</compound>
<compound>
<name>Effluvoxide</name>
<amount>20</amount>
</compound>
<compound>
<name>Calcareous Carbonic</name>
<amount>25</amount>
</compound>
<compound>
<name>Fertidore</name>
<amount>33</amount>
</compound>
<compound>
<name>Addurogon</name>
<amount>15</amount>
</compound>
<compound>
<name>Saprophytus</name>
<amount>20</amount>
</compound>
<compound>
<name>Glycoprotin</name>
<amount>33</amount>
</compound>

</orders>

but table structure is:
doctorname
orderid
name
amount

so I would like to transform xml file to another one with xsl file to gain following structure:
<?xml version="1.0" encoding="utf-8" ?>
<orders>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Riboflavorific</name>
<amount>27</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Reduxicon</name>
<amount>90</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Photicuderm</name>
<amount>70</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Polysitorum</name>
<amount>99</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Effluvoxide</name>
<amount>20</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Calcareous Carbonic</name>
<amount>25</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Fertidore</name>
<amount>33</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Addurogon</name>
<amount>15</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Saprophytus</name>
<amount>20</amount>
</compound>
<compound>
<doctorname>Andrew Dixon</doctorname>
<orderid>10/10/03</orderid>
<name>Glycoprotin</name>
<amount>33</amount>
</compound>

</orders>

could You help me, please

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top