Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wadoo/library/Zend/Form.php on line 1144

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/wadoo/library/Zend/Form.php on line 1653
Bienvenue chez moi !
Notice: compact(): Undefined variable: extras in /var/www/wadoo/library/Zend/View/Helper/HeadLink.php on line 381

Notice: compact(): Undefined variable: extras in /var/www/wadoo/library/Zend/View/Helper/HeadLink.php on line 381

Notice: compact(): Undefined variable: extras in /var/www/wadoo/library/Zend/View/Helper/HeadLink.php on line 381

Notice: compact(): Undefined variable: extras in /var/www/wadoo/library/Zend/View/Helper/HeadLink.php on line 381

Notice: compact(): Undefined variable: extras in /var/www/wadoo/library/Zend/View/Helper/HeadLink.php on line 381

Matrix-Style

Test 1

Construire une application XML
  • Jean-Christophe Bernadac
  • François Knab
Éditions : Eyrolles Paris
1999
XML, Langage et Applications
  • Alain Michard
Éditions : Eyrolles Paris
1998
XML en Action
  • William J. Pardi
Éditions : Microsoft Press Paris
James Guerin
1999
$content = $book->childNodes;
$authors = array();
$title = $publisher = $date = $translate = false;
foreach ($content as $node)
    switch($node->nodeName) {
        case "AUTHOR" : $authors[] = $node->nodeValue;break;
        case "TITLE" : $title = $node->nodeValue;break;
        case "PUBLISHER" : $publisher = $node->nodeValue;break;
        case "TRANSLATOR" : $translate = $node->nodeValue;break;
        case "DATEPUB" : $date = $node->nodeValue;break;
    }

Test 2


Notice: Trying to get property 'nodeValue' of non-object in /var/www/wadoo/application/views/scripts/test/xpath.phtml on line 89
Construire une application XML
  • Jean-Christophe Bernadac
  • François Knab
Éditions : Eyrolles Paris
1999

Notice: Trying to get property 'nodeValue' of non-object in /var/www/wadoo/application/views/scripts/test/xpath.phtml on line 89
XML, Langage et Applications
  • Alain Michard
Éditions : Eyrolles Paris
1998
XML en Action
  • William J. Pardi
Éditions : Microsoft Press Paris
adapté de l'anglais par James Guerin
1999
$rel = "//BOOK[@ISBN="\" . $book->attributes->getNamedItem("ISBN")->nodeValue . "\"]/";
        $title = $xpath->query($rel."TITLE")->item(0)->nodeValue;
        $authors = $xpath->query($rel."AUTHOR");
        $publisher = $xpath->query($rel."PUBLISHER")->item(0)->nodeValue;
        $translate = $xpath->query($rel."TRANSLATOR")->item(0)->nodeValue;
        if(!empty($translate))
            $translate = $xpath->query($rel."TRANSLATOR")->item(0)->attributes->getNamedItem("PREFIX")->nodeValue . " " . $translate;
        $date = $xpath->query($rel."DATEPUB")->item(0)->nodeValue;