note 7854 added to DOM XML functions

From: Date: Thu, 17 Aug 2000 08:39:49 +0000
Subject: note 7854 added to DOM XML functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-2032@lists.php.net to get a copy of this message
Maybe it is of interest for someone: This is an example for getting the attribute of a node "article" using the xmldoc-function. <?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]->children[0]->content); ?> http://www.php.net/manual/ref.domxml.php

« previous php.notes (#2032) next »