domxml question

From: Date: Wed, 16 Aug 2000 17:28:56 +0000
Subject: domxml question
Groups: php.general 
Request: Send a blank email to php-general+get-12068@lists.php.net to get a copy of this message
Hi ! Regarding the domxml interface of PHP 4 (I am using php-4.0.1pl2 and libxml2-2.2.2) I have a problem getting the attributes of node "article". Why doesn't this work ? <?php $docnode = xmldoc("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n". "<!DOCTYPE webdoctype SYSTEM \"webdoc.dtd\">\n". "<webdoc>\n". " <article id=\"651\"/>\n". "</webdoc>\n"); $node = $docnode->children(); $node = $node[1]->children(); $attr = $node[1]->attributes(); printf("%s=%s", $attr[0]->name, $attr[0]->content); ?> expected output: "id=651" real output: "id=" anybody any idea? greetings, Marcel.

« previous php.general (#12068) next »