Class Horde_DOM_Document

Description

Located in /DOM/DOM.php (line 37)

Horde_DOM_Node
   |
   --Horde_DOM_Document
Method Summary
 Horde_DOM_Document Horde_DOM_Document ([array $params = array()])
 Horde_DOM_Attribute create_attribute (string $name, string $value)
 Horde_DOM_Node create_text_node (string $content)
 string dump_mem ([bool $format = false], [string $encoding = false])
 mixed factory ([array $params = array()])
 array get_elements_by_tagname (string $name)
 void root ()
Variables
Methods
Constructor Horde_DOM_Document (line 117)

Constructor. Determine if we are trying to load a file or xml string based on the parameters.

Horde_DOM_Document Horde_DOM_Document ([array $params = array()])
  • array $params: Array with key 'filename' | 'xml'
create_attribute (line 249)

Create a new attribute for this document

  • return: New attribute
Horde_DOM_Attribute create_attribute (string $name, string $value)
  • string $name: The name of the attribute
  • string $value: The value of the attribute
create_element (line 224)

Create a new element for this document

  • return: New element
Horde_DOM_Element create_element (string $name)
  • string $name: Name of the new element
create_text_node (line 236)

Create a new text node for this document

  • return: New node
Horde_DOM_Node create_text_node (string $content)
  • string $content: The content of the text element
document_element (line 159)

Return the document element.

void document_element ()
dump_mem (line 195)

Return the document as a text string.

  • return: The xml document as a string
string dump_mem ([bool $format = false], [string $encoding = false])
  • bool $format: Specifies whether the output should be neatly formatted, or not
  • string $encoding: Sets the encoding attribute in line <?xml version="1.0" encoding="iso-8859-1"?>
factory (line 55)

Creates an appropriate object based on the version of PHP that is running and the requested xml source. This function should be passed an array containing either 'filename' => $filename | 'xml' => $xmlstring depending on the source of the XML document.

You can pass an optional 'options' parameter to enable extra features like DTD validation or removal of whitespaces. For a list of available features see the HORDE_DOM_LOAD defines. Multiple options are added by bitwise OR.

  • return: PHP 4 domxml document | Horde_DOM_Document | PEAR_Error
mixed factory ([array $params = array()])
  • array $params: Array containing either 'filename' | 'xml' keys. You can specify an optional 'options' key.
get_elements_by_tagname (line 171)

Return the node represented by the requested tagname.

  • return: The nodes matching the tag name
array get_elements_by_tagname (string $name)
  • string $name: The tagname requested.
root (line 151)

Return the root document element.

void root ()
xpath_new_context (line 256)
void xpath_new_context ()

Inherited Methods

Inherited From Horde_DOM_Node

 Horde_DOM_Node::Horde_DOM_Node()
 Horde_DOM_Node::append_child()
 Horde_DOM_Node::attributes()
 Horde_DOM_Node::child_nodes()
 Horde_DOM_Node::clone_node()
 Horde_DOM_Node::first_child()
 Horde_DOM_Node::get_content()
 Horde_DOM_Node::has_child_nodes()
 Horde_DOM_Node::next_sibling()
 Horde_DOM_Node::node_name()
 Horde_DOM_Node::node_type()
 Horde_DOM_Node::node_value()
 Horde_DOM_Node::remove_child()
 Horde_DOM_Node::set_content()
 Horde_DOM_Node::_importNode()
 Horde_DOM_Node::_newDOMElement()
 Horde_DOM_Node::__get()

Documentation generated on Sun, 30 Jan 2011 05:16:52 +0000 by phpDocumentor 1.4.3