note 6762 deleted from ref.domxml by sander
| From: | sander@php.net | Date: | Sun, 07 Apr 2002 11:04:07 +0000 |
| Subject: | note 6762 deleted from ref.domxml by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-28813@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