Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
XMLNode Class Reference

Public Member Functions

 addChild (&$node)
 
 getAttribute ($name)
 
 getAttributes ()
 
getChildByName ($name, $index=0)
 
getChildren ()
 
getChildValue ($name, $index=0)
 
 getName ($includeNamespace=true)
 
getParent ()
 
getValue ()
 
 setAttribute ($name, $value)
 
 setAttributes ($attributes)
 
 setName ($name)
 
 setParent (&$parent)
 
 setValue ($value)
 
toXml ($output=null)
 
 XMLNode ($name=null)
 

Detailed Description

Default handler for XMLParser returning a simple DOM-style object. This handler parses an XML document into a tree structure of XMLNode objects.

Definition at line 18 of file XMLNode.inc.php.

Member Function Documentation

XMLNode::addChild ( $node)
Parameters
$nodeXMLNode the child node to add

Definition at line 171 of file XMLNode.inc.php.

XMLNode::getAttribute (   $name)
Parameters
$namestring attribute name
Returns
string attribute value

Definition at line 91 of file XMLNode.inc.php.

Referenced by toXml().

XMLNode::getAttributes ( )
Returns
array all attributes

Definition at line 83 of file XMLNode.inc.php.

& XMLNode::getChildByName (   $name,
  $index = 0 
)
Parameters
$name
$index
Returns
XMLNode the ($index+1)th child matching the specified name

Definition at line 136 of file XMLNode.inc.php.

Referenced by getChildValue().

& XMLNode::getChildren ( )
Returns
array this node's children (XMLNode objects)

Definition at line 127 of file XMLNode.inc.php.

& XMLNode::getChildValue (   $name,
  $index = 0 
)

Get the value of a child node.

Parameters
$nameString name of node
$indexOptional integer index of child node to find

Definition at line 158 of file XMLNode.inc.php.

References getChildByName().

XMLNode::getName (   $includeNamespace = true)
Parameters
$includeNamespaceboolean
Returns
string

Definition at line 51 of file XMLNode.inc.php.

& XMLNode::getParent ( )
Returns
XMLNode

Definition at line 69 of file XMLNode.inc.php.

& XMLNode::getValue ( )
Returns
string

Definition at line 113 of file XMLNode.inc.php.

XMLNode::setAttribute (   $name,
  $value 
)
Parameters
$namestring attribute name
valuestring attribute value

Definition at line 99 of file XMLNode.inc.php.

XMLNode::setAttributes (   $attributes)
Parameters
$attributesarray

Definition at line 106 of file XMLNode.inc.php.

XMLNode::setName (   $name)
Parameters
$namestring

Definition at line 62 of file XMLNode.inc.php.

XMLNode::setParent ( $parent)
Parameters
$parentXMLNode

Definition at line 76 of file XMLNode.inc.php.

XMLNode::setValue (   $value)
Parameters
$valuestring

Definition at line 120 of file XMLNode.inc.php.

& XMLNode::toXml (   $output = null)
Parameters
$outputfile handle to write to, or true for stdout, or null if XML to be returned as string
Returns
string

Definition at line 179 of file XMLNode.inc.php.

References getAttribute().

XMLNode::XMLNode (   $name = null)

Constructor.

Parameters
$nameelement/tag name

Definition at line 39 of file XMLNode.inc.php.


The documentation for this class was generated from the following file: