Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. 90 places intérieur et TERRASSE privative de 80 places<br/>CA 1'500'000.--<br/>PV
  2.  
  3. $xml = new DOMDocument("1.0", "ISO-8859-1");
  4. $xml->preserveWhiteSpace = FALSE;
  5. $xml->formatOutput = TRUE;
  6. $xml->load($fichier, LIBXML_NOENT);
  7. $xpath = new DOMXPATH($xml);
  8. $xml -> substituteEntities = true;
  9.  
  10. foreach ($xpath->query("/$racine/annonce[@id = '$annonce']") as $node)
  11.  
  12.  
  13. {
  14.  
  15. $flagplus = $node->getElementsByTagName('flagplus')->item(0)->nodeValue;
  16. $entete = utf8_encode($node->getElementsByTagName('entete')->item(0)->nodeValue);
  17. $nouveau = $node->getElementsByTagName('nouveau')->item(0)->nodeValue;
  18. $description = utf8_encode($node->getElementsByTagName('description')->item(0)->nodeValue);
  19. $couleur = $node->getElementsByTagName('couleur')->item(0)->nodeValue;
  20. $detail = utf8_encode($node->getElementsByTagName('detail')->item(0)->data);
  21. $autre = utf8_encode($node->getElementsByTagName('autre')->item(0)->nodeValue);
  22. $contact = utf8_encode($node->getElementsByTagName('contact')->item(0)->nodeValue);
  23. $vente = utf8_encode($node->getElementsByTagName('vente')->item(0)->nodeValue);
  24.  
  25. echo "<script>alert('$detail');</script>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement