note 6762 modified in DOM XML functions by ronabop

From: Date: Sat, 13 Jan 2001 08:06:46 +0000
Subject: note 6762 modified in DOM XML functions by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-9752@lists.php.net to get a copy of this message
Using DOM/XML: Class Constructors: $doc = new DomDocument; $node = new DomNode; Methods: // Returns a DomDocument object $doc = xmldocfile( "myfile.xml" ); // Returns a DomNode object containing // the root of the DOM document $root = $doc->root(); // $newNode as the new DomNode root object $doc->add_root( $newNode ); // get the parent DomNode object of $node $node->parent(); // Array of DomNode children objects $node->children(); // Last children DomNode object $node->lastchild(); // New children DomNode object $node->new_child( $newNode ); // Array of DomAttribute objectes $node->attributes(); // returns value of attribute named $name $node->getAttribute( $name ); // sets the value of attribute named $name $node->setAttribute( $name, $value ); More info in ext/domxml/php_domxml.c http://www.php.net/manual/dom-xml-functions.php

« previous php.notes (#9752) next »