| eZDOMDocument handles DOM nodes in DOM documents
More...
List of all members.
|
Public Methods |
| | eZDOMDocument ($name="") |
| | setName ($name) |
| & | root () |
| | setRoot (&$node) |
| | appendChild (&$node) |
| & | createTextNode ($text) |
| & | createCDATANode ($text) |
| & | createElementNode ($name,$attributes=array()) |
| & | createElementTextNode ($name,$text,$attributes=array()) |
| & | createElementCDATANode ($name,$text,$attributes=array()) |
| & | createElementNodeNS ($uri,$name) |
| & | createAttributeNode ($name,$content,$prefix=false) |
| & | createAttributeNamespaceDefNode ($prefix,$uri) |
| & | createAttributeNodeNS ($uri,$name,$content) |
| & | toString ($charset=true,$charsetConversion=true) |
| | registerElement (&$node) |
| & | elementsByName ($name) |
| & | elementsByNameNS ($name,$namespaceURI) |
| | registerNamespaceAlias ($alias,$namespace) |
| & | namespaceByAlias ($alias) |
Public Attributes |
|
| Name |
| | Document name.
|
|
| Version |
| | XML version.
|
|
| NamedNodes = array() |
| | Contains an array of reference to the named nodes with namespace.
|
|
| NamedNodesNS = array() |
| | Contains an array of references to the named nodes with namespace.
|
|
| Namespaces = array() |
| | Contains an array of the registered namespaces and their aliases.
|
|
| Root |
| | Reference to the first child of the DOM document.
|
Detailed Description
eZDOMDocument handles DOM nodes in DOM documents
$doc = new eZDOMDocument();
$doc->setName( "FishCatalogue" );
$root =& $doc->createElementNode( "FishCatalogue" );
$doc->setRoot( $root );
$freshWater =& $doc->createElementNode( "FreshWater" );
$root->appendChild( $freshWater );
$saltWater =& $doc->createElementNode( "SaltWater" );
$root->appendChild( $saltWater );
$guppy =& $doc->createElementNode( "Guppy" );
$guppy->appendChild( $doc->createTextNode( "Guppy is a small livebreeder." ) );
$freshWater->appendChild( $guppy );
$cod =& $doc->createElementNode( "Cod" );
$saltWater->appendChild( $cod );
$cod->appendChild( $doc->createCDATANode( "A big dull fish <-> !!" ) );
print( $doc->toString() );
<?xml version="1.0"?>
<FishCatalogue>
<FreshWater>
<Guppy>
Guppy is a small livebreeder. </Guppy>
</FreshWater>
<SaltWater>
<Cod>
<![CDATA[A big dull fish <-> !!]]> </Cod>
</SaltWater>
</FishCatalogue>
Definition at line ezdomdocument.php.
Constructor & Destructor Documentation
| eZDOMDocument::eZDOMDocument |
( |
$ |
name = "" |
) |
|
|
|
|
Creates a new DOM document object. You can provide a name for the document.
Definition at line ezdomdocument.php.
References Name. |
Member Function Documentation
| eZDOMDocument::appendChild |
( |
&$ |
node |
) |
|
|
| & eZDOMDocument::createAttributeNamespaceDefNode |
( |
$ |
prefix, |
|
|
$ |
uri |
|
) |
|
|
| & eZDOMDocument::createAttributeNode |
( |
$ |
name, |
|
|
$ |
content, |
|
|
$ |
prefix = false |
|
) |
|
|
| & eZDOMDocument::createAttributeNodeNS |
( |
$ |
uri, |
|
|
$ |
name, |
|
|
$ |
content |
|
) |
|
|
|
|
Creates and returns an attribute node with a namespace URI
Definition at line ezdomdocument.php. |
| & eZDOMDocument::createCDATANode |
( |
$ |
text |
) |
|
|
| & eZDOMDocument::createElementCDATANode |
( |
$ |
name, |
|
|
$ |
text, |
|
|
$ |
attributes = array() |
|
) |
|
|
| & eZDOMDocument::createElementNode |
( |
$ |
name, |
|
|
$ |
attributes = array() |
|
) |
|
|
| & eZDOMDocument::createElementNodeNS |
( |
$ |
uri, |
|
|
$ |
name |
|
) |
|
|
|
|
Creates and returns a element node with a namespace URI
Definition at line ezdomdocument.php. |
| & eZDOMDocument::createElementTextNode |
( |
$ |
name, |
|
|
$ |
text, |
|
|
$ |
attributes = array() |
|
) |
|
|
| & eZDOMDocument::createTextNode |
( |
$ |
text |
) |
|
|
| & eZDOMDocument::elementsByName |
( |
$ |
name |
) |
|
|
| & eZDOMDocument::elementsByNameNS |
( |
$ |
name, |
|
|
$ |
namespaceURI |
|
) |
|
|
| & eZDOMDocument::namespaceByAlias |
( |
$ |
alias |
) |
|
|
|
|
Returns the namespace which corresponds to the given alias. Returns false if the namespace is not known.
Definition at line ezdomdocument.php.
References Namespaces. |
| eZDOMDocument::registerElement |
( |
&$ |
node |
) |
|
|
| eZDOMDocument::registerNamespaceAlias |
( |
$ |
alias, |
|
|
$ |
namespace |
|
) |
|
|
|
|
Regsiter a new namespace alias. Provide the alias/prefix and the namespace identifier.
Definition at line ezdomdocument.php.
References Namespaces. |
| & eZDOMDocument::root |
( |
|
) |
|
|
|
|
Returns the document root if it exists. False is returned if the root does not exist.
Definition at line ezdomdocument.php.
References Root. |
| eZDOMDocument::setName |
( |
$ |
name |
) |
|
|
| eZDOMDocument::setRoot |
( |
&$ |
node |
) |
|
|
| & eZDOMDocument::toString |
( |
$ |
charset = true, |
|
|
$ |
charsetConversion = true |
|
) |
|
|
The documentation for this class was generated from the following file:
|