[XML] Lire un fichier XML et Stockée les données dans la base
Bonjour,
en fait j'ai un fichier XML de ce format
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| <?xml version="1.0" encoding="utf-8"?>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<authentication login="MyLog" password="MyPass" />
<inventoryUpdate hotelId="4">
<room id="B3T">
<inventory>
<availability from="2010-12-28" to="2010-12-28" quantity="1" />
<availability from="2010-12-29" to="2010-12-31" quantity="1" />
<availability from="2011-01-01" to="2011-01-01" quantity="1" />
<availability from="2011-01-02" to="2011-03-31" quantity="1" />
<availability from="2011-04-01" to="2011-12-30" quantity="1" />
</inventory>
<rate currency="EUR" rateCode="BAR" rateName="Best Available Rate">
<planning from="2010-12-28" to="2010-12-28" minimumStay="1" unitPrice="210" noArrival="false" isClosed="false" />
<planning from="2010-12-29" to="2010-12-31" minimumStay="1" unitPrice="273" noArrival="false" isClosed="false" />
<planning from="2011-01-01" to="2011-01-01" minimumStay="1" unitPrice="340.0000" noArrival="false" isClosed="false" />
<planning from="2011-01-02" to="2011-03-31" minimumStay="1" unitPrice="294" noArrival="false" isClosed="false" />
Confidential Copyright SIRIONA 2008 - 16 novembre 2012
Chapter : Receiving inventory updates
9
<planning from="2011-04-01" to="2011-12-30" minimumStay="1"
unitPrice="340.0000" noArrival="false" isClosed="false" />
</rate>
<rate currency="EUR" rateCode="PACKAGE1" rateName="Package Offer">
<planning from="2010-12-28" to="2010-12-28" minimumStay="1" unitPrice="380.0000" noArrival="false" isClosed="false" />
<planning from="2010-12-29" to="2010-12-31" minimumStay="1" unitPrice="380.0000" noArrival="false" isClosed="false" />
<planning from="2011-01-01" to="2011-01-01" minimumStay="1" unitPrice="357" noArrival="false" isClosed="false" />
<planning from="2011-01-02" to="2011-03-31" minimumStay="1" unitPrice="340.0000" noArrival="false" isClosed="false" />
<planning from="2011-04-01" to="2011-12-30" minimumStay="1" unitPrice="340.0000" noArrival="false" isClosed="false" />
</rate>
<rate currency="EUR" rateCode="RACKPRI" rateName="Public Price">>
<planning from="2010-12-28" to="2010-12-28" minimumStay="1" unitPrice="380.0000" noArrival="false" isClosed="false" />
<planning from="2010-12-29" to="2010-12-31" minimumStay="1" unitPrice="380.0000" noArrival="false" isClosed="false" />
<planning from="2011-01-01" to="2011-01-01" minimumStay="1" unitPrice="340.0000" noArrival="false" isClosed="false" />
<planning from="2011-01-02" to="2011-03-31" minimumStay="1" unitPrice="340.0000" noArrival="false" isClosed="false" />
<planning from="2011-04-01" to="2011-12-30" minimumStay="1" unitPrice="340.0000" noArrival="false" isClosed="false" />
</rate>
</room>
</inventoryUpdate>
</message> |
et je veux lire ces donnée et stockée dans la base de données et je sais pas comment je faire le mapping de ces champ avec mes champ dans la base de donnée si quelqu'un peut m'aider
Merci en avance