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

Langage PHP Discussion :

[POO] Problème pour Parser une page XML


Sujet :

Langage PHP

  1. #1
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut [POO] Problème pour Parser une page XML
    Salut a tous,

    j'ai un petit problème.

    J'ai récupérer une classe pour parser du xml. (je ne pense pas que le probleme vienne de la classe ^^).


    Si vous voulez la voir:
    http://manganime.0.free.Fr/fichierma.../XMLparser.txt

    Donc dans ma page tout d'abord j'ai un lien d'un page xml. Ensuite j'utilise simplexml_load_file pour récupérer le XML de la page (je suis pas sure de ce coup, ca viens de moi l'idée :/).

    Bref voici le code, en fait je n'arrive pas a récupérer de résultat.


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
    $asins='B0007RTFQ6';
    $request='http://webservices.amazon.fr/onca/xml?Servic*****';
    $xml=simplexml_load_file($request);
     
    $xmltoarray = new xmltoarray_parser_htmlfix(); //create instance of class      
    $xmltoarray->xmlparser_setoption(XML_OPTION_SKIP_WHITE, 1); //set options same as xml_parser_set_option
    $xmltoarray->xmlparser_setoption(XML_OPTION_CASE_FOLDING, 0);
    $xmltoarray->xmlparser_fix_into_struct($xml); //fixes html values for XML
    $array = $xmltoarray->createArray(); //creates an array with fixed html values
    foreach($array as $key => $value)
    {
    	$array[$key] = $xmltoarray->fix_html_entities($value); //returns proper html values	
    }
    Voila comment dois-je faire pour récupérer les valeurs?

    (ps: voila un exemple de ficier xml que j'obtient: http://manganime.0.free.Fr/fichiermanganime.0/test.xml)

    Merci d'avance
    manganimes (en construction) -
    zemanga

  2. #2
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691
    Par défaut
    mouai

    ta classe xmlParser a l'air de ce basé sur sax or simple_xml se base sur dom,
    si ton fichier n'est pas volumineux laisse tomber ta classe et utilise simple_xml

    a mon avis tu ne peut pas envoyer a ta classe un objet simple_xml, tour plus une chaine de caractere

  3. #3
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    J'ai essayé ca :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
     $xmlstr=simplexml_load_file($request);
    $xml = new SimpleXMLElement($xmlstr);
    mais ca me renvoie l'erreur:

    Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in D:\wamp\www\manganimesV3.0\amazon\testamazon.php:13 Stack trace: #0 D:\wamp\www\manganimesV3.0\amazon\testamazon.php(13): SimpleXMLElement->__construct('') #1 {main} thrown in D:\wamp\www\manganimesV3.0\amazon\testamazon.php on line 13
    La ligne 13 correspond à la deuxième ligne. Savez vous à quoi est due l'erreur?
    manganimes (en construction) -
    zemanga

  4. #4
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691
    Par défaut
    http://fr.php.net/manual/fr/function...-load-file.phpsimplexml_load_file -- Convertit un fichier XML en objet
    tu a deja ton objet simplexml

  5. #5
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    Et je fait comment pour récupérer les valeurs après?
    manganimes (en construction) -
    zemanga

  6. #6
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691
    Par défaut
    tu parcour ton objet comme un tableau

  7. #7
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    J'y arrive vraiment pas :/.

    Quand je fais un print_r de mon objet j'obtiens:

    Object ( [OperationRequest] => SimpleXMLElement Object ( [HTTPHeaders] => SimpleXMLElement Object ( [Header] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => UserAgent ) ) ) [RequestId] => 1BNRE9076N7SW7JXSM56 [Arguments] => SimpleXMLElement Object ( [Argument] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => Service [Value] => AWSECommerceService ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => AssociateTag [Value] => manganimes0e-21 ) ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => AWSAccessKeyId [Value] => 1KAV****02 ) ) [3] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => ItemId [Value] => B0007RTFQ6 ) ) [4] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => ResponseGroup [Value] => Offers ) ) [5] => SimpleXMLElement Object ( [@attributes] => Array ( [Name] => Operation [Value] => ItemLookup ) ) ) ) [RequestProcessingTime] => 0.0371220111846924 ) [Items] => SimpleXMLElement Object ( [Request] => SimpleXMLElement Object ( [IsValid] => True [ItemLookupRequest] => SimpleXMLElement Object ( [ItemId] => B0007RTFQ6 [ResponseGroup] => Offers ) ) [Item] => SimpleXMLElement Object ( [ASIN] => B0007RTFQ6 [OfferSummary] => SimpleXMLElement Object ( [LowestNewPrice] => SimpleXMLElement Object ( [Amount] => 5000 [CurrencyCode] => EUR [FormattedPrice] => EUR 50,00 ) [TotalNew] => 4 [TotalUsed] => 0 [TotalCollectible] => 0 [TotalRefurbished] => 0 ) [Offers] => SimpleXMLElement Object ( [TotalOffers] => 1 [TotalOfferPages] => 1 [Offer] => SimpleXMLElement Object ( [Merchant] => SimpleXMLElement Object ( [MerchantId] => A1X6FK5RDHNB96 [GlancePage] => http://www.amazon.fr/gp/help/seller/...A1X6FK5RDHNB96 ) [OfferAttributes] => SimpleXMLElement Object ( [Condition] => New ) [OfferListing] => SimpleXMLElement Object ( [OfferListingId] => wA2SbFpDZwzyJtKbQW8Rq%2FR4cDLz4yF7MYoxARM%2FTr6xX1m6rwqpczUM4RCCw05arRRs169NrQ8%3D [Price] => SimpleXMLElement Object ( [Amount] => 5506 [CurrencyCode] => EUR [FormattedPrice] => EUR 55,06 ) [Availability] => Habituellement expédié sous 24 h [IsEligibleForSuperSaverShipping] => 1 ) ) ) ) ) )
    Comment je dois faire par exemple pour récupérer le prix dans:
    Object ( [Amount] => 5506 [CurrencyCode] => EUR [FormattedPrice] => EUR 55,06 )
    ?
    manganimes (en construction) -
    zemanga

  8. #8
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691
    Par défaut
    http://fr.php.net/manual/fr/ref.simplexml.php

    fait voir ton xml ce sera beaucoup plus simple

  9. #9
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    Citation Envoyé par jeff_!
    http://fr.php.net/manual/fr/ref.simplexml.php

    fait voir ton xml ce sera beaucoup plus simple
    Oui ca fait 1 heures que j'essaie de faire un truc avec tout les exemples de cette pages mais j'arrive a rien lol.

    Sinon ma page XML est au dessus. (http://manganime.0.free.Fr/fichiermanganime.0/test.xml)
    manganimes (en construction) -
    zemanga

  10. #10
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691
    Par défaut
    en utilisant xpath
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    $xml=simplexml_load_file($request);
    $price = $xml->xpath('//Price');
    echo $price->Amount;
    echo $price->CurrencyCode;
    sinon
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
     
    $xml=simplexml_load_file($request);
    $price = $xml->OperationRequest->Items->Item->Offers->Offer->OfferListing->Price;

  11. #11
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    Ca me renvoie rien quand je fais ca .

    Mais au moin y'a pas d'erreur lol.
    manganimes (en construction) -
    zemanga

  12. #12
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691
    Par défaut
    la requte xpath doit etre foireuse

  13. #13
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    C'est marrant la fonction xpath n'apparait pas dans la bibliotheque de php.net.

    :/.

    Décidement, c'est la grosse galère lol.
    manganimes (en construction) -
    zemanga

  14. #14
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691

  15. #15
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    J'ai essayé avec l'exemple de cette page. Ca me donne un truc du genre:
    Code : 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
     
    <?php
     
    //$xml=simplexml_load_file('test.xml');
    // List of ASINs (up to 10) to find browse nodes for
    $asins='B0007RTFQ6';
     
    // Our Amazon request. Note use of BrowseNodes Response Group
    $request='http://webservices.amazon.fr/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=1KA***02&Operation=ItemLookup&ItemId='.$asins.'&AssociateTag=manganimes0e-21&ResponseGroup=Offers';
    $xml=simplexml_load_file($request);
     
    /* On cherche <a><b><c> */
    $result =$xml->xpath('/ItemLookupResponse/Items/Item/Offers/Offer/OfferListing/Price/FormattedPrice');
     
    while(list( , $node) = each($result)) {
       echo 'FormattedPrice: ',$node,"\n";
    }
     
    /* Les chemins relatifs fonctionnent aussi... */
    $result = $xml->xpath('Price/FormattedPrice');
     
    while(list( , $node) = each($result)) {
       echo 'b/c: ',$node,"\n";
    }
    ?>
    mais ca ne donne strictement rien :/. il n'entre pas dans le while.

    Pourtant le xml est :

    <ItemLookupResponse>
    +
    <OperationRequest>
    +
    <HTTPHeaders>
    <Header Name="UserAgent" Value="Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6"/>
    </HTTPHeaders>
    <RequestId>1AHSGCE2RVK0GXBMGJY6</RequestId>
    +
    <Arguments>
    <Argument Name="Service" Value="AWSECommerceService"/>
    <Argument Name="AssociateTag" Value="manganimes0e-21"/>
    <Argument Name="AWSAccessKeyId" Value="1K****"/>
    <Argument Name="ItemId" Value="B0007RTFQ6"/>
    <Argument Name="ResponseGroup" Value="Offers"/>
    <Argument Name="Operation" Value="ItemLookup"/>
    </Arguments>
    <RequestProcessingTime>0.0460481643676758</RequestProcessingTime>
    </OperationRequest>

    <Items>
    +
    <Request>
    <IsValid>True</IsValid>
    +
    <ItemLookupRequest>
    <ItemId>B0007RTFQ6</ItemId>
    <ResponseGroup>Offers</ResponseGroup>
    </ItemLookupRequest>
    </Request>

    <Item>
    <ASIN>B0007RTFQ6</ASIN>
    +
    <OfferSummary>
    +
    <LowestNewPrice>
    <Amount>5000</Amount>
    <CurrencyCode>EUR</CurrencyCode>
    <FormattedPrice>EUR 50,00</FormattedPrice>
    </LowestNewPrice>
    <TotalNew>4</TotalNew>
    <TotalUsed>0</TotalUsed>
    <TotalCollectible>0</TotalCollectible>
    <TotalRefurbished>0</TotalRefurbished>
    </OfferSummary>

    <Offers>
    <TotalOffers>1</TotalOffers>
    <TotalOfferPages>1</TotalOfferPages>

    <Offer>
    +
    <Merchant>
    <MerchantId>A1X6FK5RDHNB96</MerchantId>
    +
    <GlancePage>
    http://www.amazon.fr/gp/help/seller/...A1X6FK5RDHNB96
    </GlancePage>
    </Merchant>
    +
    <OfferAttributes>
    <Condition>New</Condition>
    </OfferAttributes>

    <OfferListing>
    +
    <OfferListingId>
    Jd4JX70%2FjMblQS7k4H7YeGhNBpbpzem72fysVnbVsroVL0pBifRSzokh7kcJRpusTDuaD%2BDrlE8%3D
    </OfferListingId>

    <Price>
    <Amount>5506</Amount>
    <CurrencyCode>EUR</CurrencyCode>
    <FormattedPrice>EUR 55,06</FormattedPrice>
    </Price>
    <Availability>Habituellement expédié sous 24 h</Availability>
    <IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping>
    </OfferListing>
    </Offer>
    </Offers>
    </Item>
    </Items>
    </ItemLookupResponse>
    manganimes (en construction) -
    zemanga

  16. #16
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    J'ai compris pourquoi ca ne marche pas.

    C'est a caus des attribut dans les tag.

    EN effet ca marche pour <tag> mais quand il y a <tag value="valeur"> ca ne marche plus .

    Vous avez une idée pour remédier à ca?
    manganimes (en construction) -
    zemanga

  17. #17
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    En fait c'est juste cette ligne la qui fait que ca ne marche pas:

    <ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2005-10-05">
    alors que

    <ItemLookupResponse>
    Marche.

    ps:
    mon code actuel:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    //$xml = new SimpleXMLElement($string);
    $xml=simplexml_load_file('test1.xml');
     
    /* On cherche <a><b><c> */
    //$result = $xml->xpath('/ItemLookupResponse/Items/Item/Offers/Offer/OfferListing/Price/FormattedPrice');
    $result = $xml->xpath('//FormattedPrice');
     
    while(list( , $node) = each($result)) {
       echo 'Prix: ',$node,"\n";
    }
     
    echo '<br><br>';
    Vous avez pas d'idée qui me permetteraient de résoudrent ce problème?
    manganimes (en construction) -
    zemanga

  18. #18
    Membre éclairé Avatar de Death83
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    1 667
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 1 667
    Points : 878
    Points
    878
    Par défaut
    Bon je suis toujours en train de galérer dessus et je n'ai toujours pas trouver de solution .


    Je récupert bien les info dans un xmlsimple object mais je n'arrive pas à les récupérer par la suite.

    Quand je fais ca:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    $infosAmazon = simplexml_load_file($request);
     var_dump($infosAmazon);
    ca me renvoie:
    object(SimpleXMLElement)#1 (2) { ["OperationRequest"]=> object(SimpleXMLElement)#2 (4) { ["HTTPHeaders"]=> object(SimpleXMLElement)#4 (1) { ["Header"]=> object(SimpleXMLElement)#6 (1) { ["@attributes"]=> array(1) { ["Name"]=> string(9) "UserAgent" } } } ["RequestId"]=> string(20) "02SCXTCXNSAM5H5MNEY7" ["Arguments"]=> object(SimpleXMLElement)#5 (1) { ["Argument"]=> array(6) { [0]=> object(SimpleXMLElement)#7 (1) { ["@attributes"]=> array(2) { ["Name"]=> string(7) "Service" ["Value"]=> string(19) "AWSECommerceService" } } [1]=> object(SimpleXMLElement)#8 (1) { ["@attributes"]=> array(2) { ["Name"]=> string(12) "AssociateTag" ["Value"]=> string(15) "manganimes0e-21" } } [2]=> object(SimpleXMLElement)#9 (1) { ["@attributes"]=> array(2) { ["Name"]=> string(14) "AWSAccessKeyId" ["Value"]=> string(20) "1KAVKBRK2CG8G5PY1002" } } [3]=> object(SimpleXMLElement)#10 (1) { ["@attributes"]=> array(2) { ["Name"]=> string(6) "ItemId" ["Value"]=> string(10) "B0007RTFQ6" } } [4]=> object(SimpleXMLElement)#11 (1) { ["@attributes"]=> array(2) { ["Name"]=> string(13) "ResponseGroup" ["Value"]=> string(6) "Offers" } } [5]=> object(SimpleXMLElement)#12 (1) { ["@attributes"]=> array(2) { ["Name"]=> string(9) "Operation" ["Value"]=> string(10) "ItemLookup" } } } } ["RequestProcessingTime"]=> string(18) "0.0395729541778564" } ["Items"]=> object(SimpleXMLElement)#3 (2) { ["Request"]=> object(SimpleXMLElement)#13 (2) { ["IsValid"]=> string(4) "True" ["ItemLookupRequest"]=> object(SimpleXMLElement)#15 (2) { ["ItemId"]=> string(10) "B0007RTFQ6" ["ResponseGroup"]=> string(6) "Offers" } } ["Item"]=> object(SimpleXMLElement)#14 (3) { ["ASIN"]=> string(10) "B0007RTFQ6" ["OfferSummary"]=> object(SimpleXMLElement)#16 (5) { ["LowestNewPrice"]=> object(SimpleXMLElement)#18 (3) { ["Amount"]=> string(4) "4300" ["CurrencyCode"]=> string(3) "EUR" ["FormattedPrice"]=> string(9) "EUR 43,00" } ["TotalNew"]=> string(1) "5" ["TotalUsed"]=> string(1) "0" ["TotalCollectible"]=> string(1) "0" ["TotalRefurbished"]=> string(1) "0" } ["Offers"]=> object(SimpleXMLElement)#17 (3) { ["TotalOffers"]=> string(1) "1" ["TotalOfferPages"]=> string(1) "1" ["Offer"]=> object(SimpleXMLElement)#19 (3) { ["Merchant"]=> object(SimpleXMLElement)#20 (2) { ["MerchantId"]=> string(14) "A1X6FK5RDHNB96" ["GlancePage"]=> string(67) "http://www.amazon.fr/gp/help/seller/home.html?seller=A1X6FK5RDHNB96" } ["OfferAttributes"]=> object(SimpleXMLElement)#21 (1) { ["Condition"]=> string(3) "New" } ["OfferListing"]=> object(SimpleXMLElement)#22 (4) { ["OfferListingId"]=> string(78) "hDr38lFGFpxl0F6eguQQhajR81MsxBtANq9UrRLEwVhhhP3zlrOPLxQKP8Fi4VNPCLqi3dEusyo%3D" ["Price"]=> object(SimpleXMLElement)#23 (3) { ["Amount"]=> string(4) "5506" ["CurrencyCode"]=> string(3) "EUR" ["FormattedPrice"]=> string(9) "EUR 55,06" } ["Availability"]=> string(34) "Habituellement expédié sous 24 h" ["IsEligibleForSuperSaverShipping"]=> string(1) "1" } } } } } }
    Je veut récupérer ca:
    ["FormattedPrice"]=> string(9) "EUR 43,00"

    Comment dois-je faire? (j'ai essayer plein de methode avec fr.php.net (pour ne pas dire toute et je n'ai eu aucun résultats satisfaitsant).
    manganimes (en construction) -
    zemanga

  19. #19
    Membre éclairé
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    882
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 882
    Points : 691
    Points
    691
    Par défaut
    salut
    tu devrai tenter une rechcerche xpath avce DOM du style '//FormattedPrice' =>prend tout les noeuds FormattedPrice de ton fichier xml
    et si tu n'y arrive va faire un tour du coté du forum xml

Discussions similaires

  1. CURL et QWebElement pour parser une page HTML
    Par moumous24 dans le forum Qt
    Réponses: 4
    Dernier message: 30/05/2011, 11h45
  2. [DOM4J] Problème pour "parser" un fichier XML avec accents
    Par mlny84 dans le forum Format d'échange (XML, JSON...)
    Réponses: 7
    Dernier message: 26/11/2007, 19h06
  3. [JDOM] Problème pour parser un fichier XML [débutant]
    Par adn013 dans le forum Format d'échange (XML, JSON...)
    Réponses: 2
    Dernier message: 16/05/2007, 12h00
  4. Problème pour visionner une page HTTPS
    Par ahage4x4 dans le forum Autres Logiciels
    Réponses: 5
    Dernier message: 07/02/2006, 18h41
  5. problème pour parser un fichier xml avec XML::Simple
    Par black_code dans le forum Modules
    Réponses: 3
    Dernier message: 30/01/2006, 19h32

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