[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/xml/tree/ -> Node.php (sommaire)

(pas de description)

Poids: 605 lignes (19 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 0 fichiers

Définit 1 class

XML_Tree_Node:: (16 méthodes):
  XML_Tree_Node()
  addChild()
  cloneNode()
  insertChild()
  removeChild()
  registerName()
  get()
  getAttribute()
  setAttribute()
  unsetAttribute()
  setContent()
  getElement()
  getNodeAt()
  encodeXmlEntities()
  decodeXmlEntities()
  dump()


Classe: XML_Tree_Node  - X-Ref

\ingroup XML

PEAR::XML_Tree_Node

XML_Tree_Node($name, $content = '', $attributes = array()   X-Ref
Constructor

param: string    name            Node name
param: string    content         Node content (text)
param: array     attributes      Attribute-hash for the node

addChild($child, $content = '', $attributes = array()   X-Ref
Append a child node to this node, after all other nodes

param: mixed      child           Child to insert (XML_Tree or XML_Tree_Node),
param: string     content         Content (text) for the new node (only if
param: array      attributes      Attribute-hash for new node
return: object  reference to new child node

cloneNode()   X-Ref
Get a copy of this node by clone this node and all of its children,
recursively.

return: object    Reference to the cloned copy.

insertChild($path,$pos,&$child, $content = '', $attributes = array()   X-Ref
Inserts child ($child) to a specified child-position ($pos)

param: mixed      path            Path to parent node to add child (see getNodeAt()
param: integer    pos             Position where to insert the new child.
param: mixed      child           Child to insert (XML_Tree or XML_Tree_Node),
param: string     content         Content (text) for the new node (only if
param: array      attributes      Attribute-hash for new node
return: Reference to the newly inserted node, or PEAR_Error upon insertion error.

removeChild($pos)   X-Ref
Removes child at a given position

param: integer     pos     position of child to remove in children-list.
return: mixed     The removed node, or PEAR_Error upon removal error.

registerName($name, $path)   X-Ref
Register a namespace.

param: string  $name namespace
param: string  $path path

get($use_cdata_section = false)   X-Ref
Returns text representation of this node.

return: string   text (xml) representation of this node. Each tag is

getAttribute($name)   X-Ref
Get an attribute by its name.

param: string  $name     Name of attribute to retrieve
return: string  attribute, or null if attribute is unset.

setAttribute($name, $value = '')   X-Ref
Sets an attribute for this node.

param: string    name        Name of attribute to set
param: string    value       Value of attribute

unsetAttribute($name)   X-Ref
Unsets an attribute of this node.

param: string  $name     Name of attribute to unset

setContent($content, $use_cdata_section = null)   X-Ref
Sets the content for this node.

param: string    content     Node content to assign

getElement($path)   X-Ref
Gets an element by its 'path'.

param: array     path    path to element: sequence of indexes to the
return: object    reference to element found, or PEAR_Error if node can't

getNodeAt($path)   X-Ref
Get a reference to a node by its 'path'.

param: mixed     path    Path to node. Can be either a string (slash-separated
return: object    Reference to the XML_Tree_Node found, or PEAR_Error if

encodeXmlEntities($xml)   X-Ref
Escape XML entities.

param: string  xml      Text string to escape.
return: string  xml

decodeXmlEntities($xml)   X-Ref
Decode XML entities in a text string.

param: string  xml  Text to decode
return: string  Decoded text

dump()   X-Ref
Print text representation of XML_Tree_Node.




Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics