IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques et frameworks PHP Discussion :

[XML] Lire un fichier XML et Stockée les données dans la base


Sujet :

Bibliothèques et frameworks PHP

  1. #1
    Invité
    Invité(e)
    Par défaut [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 xml : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    Dernière modification par rawsrc ; 20/07/2013 à 20h19. Motif: Merci de préciser le langage utilisé avec [code=xml] et mise en forme

Discussions similaires

  1. Réponses: 6
    Dernier message: 05/10/2017, 14h45
  2. Réponses: 0
    Dernier message: 08/05/2012, 09h40
  3. Réponses: 1
    Dernier message: 06/12/2011, 21h08
  4. Lire un fichier binaire et ranger les données dans un tableau
    Par Flaherty Mc Coillean dans le forum Débuter
    Réponses: 1
    Dernier message: 31/05/2009, 17h45
  5. [XML][HTML]Insérer les données dans la page HTMl
    Par mafyoso dans le forum XML/XSL et SOAP
    Réponses: 4
    Dernier message: 23/01/2006, 12h10

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo