Class DOMIT_Document

Description

A class representing the DOM Document

Located in /includes/domit/xml_domit_parser.php (line 764)

DOMIT_Node
   |
   --DOMIT_ChildNodes_Interface
      |
      --DOMIT_Document
Direct descendents
Class Description
dom_xmlrpc_domit_document Wraps a DOMIT! DOM document in the DOM XML-RPC API
Variable Summary
Method Summary
DOMIT_Document DOMIT_Document ()
Object &appendChild (Object &$node)
void appendEntityTranslationTable (array $table)
Object &cloneNode ([boolean $deep = false])
Object &createAttribute (string $name)
Object &createAttributeNS (string $namespaceURI, string $qualifiedName)
Object &createCDATASection (string $data)
Object &createComment (string $text)
Object &createElement (string $tagName)
Object &createElementNS (string $namespaceURI, string $qualifiedName)
Object &createProcessingInstruction (string $target, string $data)
Object &createTextNode (string $data)
void expandEmptyElementTags (boolean $truthVal, [mixed $expandEmptyElementExceptions = false])
mixed getDocType ()
Object &getElementByID (string $elementID, [boolean $isStrict = true])
mixed &getElementsByAttributePath (string $pattern, int $nodeIndex)
mixed &getElementsByPath (string $pattern, int $nodeIndex)
Object &getElementsByTagName (string $tagName)
Object &getElementsByTagNameNS (string $namespaceURI, string $localName)
int getErrorCode ()
string getErrorString ()
Object &getNodesByNodeType (string $type, Object &$contextNode)
Object &getNodesByNodeValue (string $value, Object &$contextNode)
string getText ()
string getTextFromFile (string $filename)
Object getVersion ()
object The &importNode (object A &$importedNode, [boolean $deep = true])
Object &insertBefore (Object &$newChild, Object &$refChild)
void load (Object &$contextNode)
boolean loadXML (string $filename, [boolean $useSAXY = true], [boolean $preserveCDATA = true], [boolean $fireLoadEvent = false])
string parsedBy ()
boolean parseXML (string $xmlText, [boolean $useSAXY = true], [boolean $preserveCDATA = true], [boolean $fireLoadEvent = false])
Object &removeChild (Object &$oldChild)
Object &replaceChild (Object &$newChild, Object &$oldChild)
void resolveErrors (boolean $truthVal)
boolean saveTextToFile (string $filename, string $text)
boolean saveXML (string $filename, [boolean $normalized = false])
void setAuthorization (string $user, string $password)
void setConnection (string $host, [string $path = '/'], [int $port = 80], int $timeout, [string $user = null], [string $password = null])
Object &setDocumentElement (Object &$node)
void setNamespaceAwareness (boolean $truthVal)
void setProxyAuthorization (string $user, string $password)
void setProxyConnection (string $host, [string $path = '/'], [int $port = 80], int $timeout, [string $user = null], [string $password = null])
Array toArray ()
string toString ([boolean $htmlSafe = false], [boolean $subEntities = true])
object The &_importNode (object A &$parentNode, object A &$sourceNode, boolean $deep)
Variables
Array $definedEntities = array() (line 780)
  • var: User defined translation table for XML entities; passed to SAXY
Object $doctype (line 768)
  • var: A reference to a DOMIT_DocType object
Object $documentElement (line 770)
  • var: A reference to the root node of the DOM document
boolean $doExpandEmptyElementTags = false (line 784)
  • var: If true, elements tags will be rendered to string as <element></element> rather than <element/>
boolean $doResolveErrors = false (line 782)
  • var: If true, loadXML or parseXML will attempt to detect and repair invalid xml
int $errorCode = 0 (line 790)
  • var: The error code returned by the SAX parser
string $errorString = '' (line 792)
  • var: The error string returned by the SAX parser
array $expandEmptyElementExceptions = array() (line 786)
  • var: A list of exceptions to the empty element expansion rule
object A $httpConnection = null (line 794)
  • var: reference to a http connection or proxy server, if one is required
Object $implementation (line 774)
  • var: A reference to the DOMIT_DOMImplementation object
boolean $isModified (line 776)
  • var: True if the DOM document has been modifed since being parsed (NOT YET IMPLEMENTED!)
boolean $isNamespaceAware = false (line 788)
  • var: If true, namespaces will be processed
string $parser (line 772)
  • var: The parser used to process the DOM document, either "EXPAT" or "SAXY"
boolean $preserveWhiteSpace = false (line 778)
  • var: True if whitespace is to be preserved during parsing (NOT YET IMPLEMENTED!)
Object $xmlDeclaration (line 766)
  • var: The xml declaration processing instruction

Inherited Variables

Inherited from DOMIT_Node

DOMIT_Node::$attributes
DOMIT_Node::$childCount
DOMIT_Node::$childNodes
DOMIT_Node::$firstChild
DOMIT_Node::$lastChild
DOMIT_Node::$localname
DOMIT_Node::$namespaceURI
DOMIT_Node::$nextSibling
DOMIT_Node::$nodeName
DOMIT_Node::$nodeType
DOMIT_Node::$nodeValue
DOMIT_Node::$ownerDocument
DOMIT_Node::$parentNode
DOMIT_Node::$prefix
DOMIT_Node::$previousSibling
DOMIT_Node::$uid
Methods
Constructor DOMIT_Document (line 799)

DOM Document constructor

DOMIT_Document DOMIT_Document ()
appendChild (line 1019)

Appends a node to the childNodes list of the current node

  • return: The appended node
Object &appendChild (Object &$node)
  • Object &$node: The node to be appended

Redefinition of:
DOMIT_ChildNodes_Interface::appendChild()
Appends a node to the childNodes list of the current node
appendEntityTranslationTable (line 1671)

Appends an array of entity mappings to the existing translation table

Intended mainly to facilitate the conversion of non-ASCII entities into equivalent characters

void appendEntityTranslationTable (array $table)
  • array $table: A list of entity mappings in the format: array('&amp;' => '&');
cloneNode (line 1698)

Copies a node and/or its children

  • return: A copy of the node and/or its children
Object &cloneNode ([boolean $deep = false])
  • boolean $deep: True if all child nodes are also to be cloned

Redefinition of:
DOMIT_Node::cloneNode()
Copies a node and/or its children
createAttribute (line 1231)

Creates a new DOMIT_Attr node

  • return: The new attribute node
Object &createAttribute (string $name)
  • string $name: The name of the attribute
createAttributeNS (line 1243)

Creates a new DOMIT_Attr node (namespace aware)

  • return: The new attribute node
Object &createAttributeNS (string $namespaceURI, string $qualifiedName)
  • string $namespaceURI: The namespaceURI of the attribute
  • string $qualifiedName: The qualifiedName of the attribute
createCDATASection (line 1317)

Creates a new DOMIT_CDataSection node

  • return: The new CDATASection node
Object &createCDATASection (string $data)
  • string $data: The text of the CDATASection
createComment (line 1329)

Creates a new DOMIT_Comment node

  • return: The new comment node
Object &createComment (string $text)
  • string $text: The comment text
createDocumentFragment (line 1219)

Creates a new DOMIT_DocumentFragment node

  • return: The new document fragment node
Object &createDocumentFragment ()
createElement (line 1266)

Creates a new DOMIT_Element node

  • return: The new element
Object &createElement (string $tagName)
  • string $tagName: The tag name of the element
createElementNS (line 1279)

Creates a new DOMIT_Element node (namespace aware)

  • return: The new element
Object &createElementNS (string $namespaceURI, string $qualifiedName)
  • string $namespaceURI: The namespaceURI of the element
  • string $qualifiedName: The qualifiedName of the element
createProcessingInstruction (line 1342)

Creates a new DOMIT_ProcessingInstruction node

  • return: The new processing instruction node
Object &createProcessingInstruction (string $target, string $data)
  • string $target: The target of the processing instruction
  • string $data: The data of the processing instruction
createTextNode (line 1305)

Creates a new DOMIT_Text node

  • return: The new text node
Object &createTextNode (string $data)
  • string $data: The text of the node
expandEmptyElementTags (line 896)

Specifies whether elements tags will be rendered to string as <element></element> rather than <element/>

void expandEmptyElementTags (boolean $truthVal, [mixed $expandEmptyElementExceptions = false])
  • boolean $truthVal: True if the expanded form is to be used
  • mixed $expandEmptyElementExceptions: An array of tag names that should be excepted from expandEmptyElements rule (optional)
getDocType (line 1621)

Returns a doctype object

  • return: The doctype object, or null if none exists
mixed getDocType ()
getDOMImplementation (line 1637)

Returns a reference to the DOMIT_DOMImplementation object

  • return: A reference to the DOMIT_DOMImplementation object
Object &getDOMImplementation ()
getElementByID (line 1386)

Returns the element whose ID is given by elementId.

  • return: The found element or null
Object &getElementByID (string $elementID, [boolean $isStrict = true])
  • string $elementID: The id of the matching element
  • boolean $isStrict: True if XML spec is to be strictly adhered to (only attributes xml:id are considered valid)
getElementsByAttributePath (line 1422)

Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like attribute expression (NOT YET IMPLEMENTED!)

  • return: A NodeList or single node that matches the pattern
mixed &getElementsByAttributePath (string $pattern, int $nodeIndex)
  • string $pattern: The query pattern
  • int $nodeIndex: If a single node is to be returned (rather than the entire NodeList) the index of that node

Redefinition of:
DOMIT_Node::getElementsByAttributePath()
Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like attribute expression (NOT YET IMPLEMENTED!)
getElementsByPath (line 1407)

Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.

  • return: A NodeList or single node that matches the pattern
mixed &getElementsByPath (string $pattern, int $nodeIndex)
  • string $pattern: The query pattern
  • int $nodeIndex: If a single node is to be returned (rather than the entire NodeList) the index of that node

Redefinition of:
DOMIT_Node::getElementsByPath()
Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
getElementsByTagName (line 1354)

Retrieves a NodeList of child elements with the specified tag name

  • return: A NodeList of found elements
Object &getElementsByTagName (string $tagName)
  • string $tagName: The matching element tag name
getElementsByTagNameNS (line 1370)

Retrieves a NodeList of child elements with the specified namespaceURI and localName

  • return: A NodeList of found elements
Object &getElementsByTagNameNS (string $namespaceURI, string $localName)
  • string $namespaceURI: The matching namespaceURI
  • string $localName: The matching localName
getErrorCode (line 879)

Returns the error code from the underlying SAX parser

  • return: The error code
int getErrorCode ()
getErrorString (line 887)

Returns the error string from the underlying SAX parser

  • return: The error string
string getErrorString ()
getNodesByNodeType (line 1437)

Retrieves all child nodes of the specified nodeType

  • return: A NodeList containing found nodes
Object &getNodesByNodeType (string $type, Object &$contextNode)
  • string $type: The nodeType of matching nodes
  • Object &$contextNode: The root node of the search
getNodesByNodeValue (line 1465)

Retrieves all child nodes of the specified nodeValue

  • return: A NodeList containing found nodes
Object &getNodesByNodeValue (string $value, Object &$contextNode)
  • string $value: The nodeValue of matching nodes
  • Object &$contextNode: The root node of the search
getText (line 1608)

Returns the concatented text of the current node and its children

  • return: The concatented text of the current node and its children
string getText ()

Redefinition of:
DOMIT_Node::getText()
Returns the concatented text of the current node and its children
getTextFromFile (line 1539)

Retrieves text from a file

  • return: The text contained in the file
string getTextFromFile (string $filename)
  • string $filename: The file path
getVersion (line 1660)

Returns the current version of DOMIT!

  • return: The current version of DOMIT!
Object getVersion ()
getXMLDeclaration (line 1629)

Returns the xml declaration processing instruction

  • return: The xml declaration processing instruction, or null if none exists
mixed getXMLDeclaration ()
importNode (line 934)

Imports a node (and optionally its children) from another DOM Document

  • return: imported node (and, if specified, its children)
object The &importNode (object A &$importedNode, [boolean $deep = true])
  • object A &$importedNode: reference to the node to be imported
  • boolean $deep: True if the children of the imported node are also to be imported
insertBefore (line 1144)

Inserts a node to the childNodes list of the current node

  • return: The inserted node
Object &insertBefore (Object &$newChild, Object &$refChild)
  • Object &$newChild: The node to be inserted
  • Object &$refChild: The node before which the insertion is to occur

Redefinition of:
DOMIT_ChildNodes_Interface::insertBefore()
Inserts a node to the childNodes list of the current node
load (line 1645)

Manages the firing of the onLoad() event

void load (Object &$contextNode)
  • Object &$contextNode: The parent node of the current recursion
loadXML (line 1528)

Parses an xml file

  • return: True if parsing is successful
boolean loadXML (string $filename, [boolean $useSAXY = true], [boolean $preserveCDATA = true], [boolean $fireLoadEvent = false])
  • string $filename: The xml file to be parsed
  • boolean $useSAXY: True if SAXY is to be used instead of Expat
  • boolean $preserveCDATA: False if CDATA Section are to be generated as Text nodes
  • boolean $fireLoadEvent: True if onLoad is to be called on each node after parsing
parsedBy (line 1600)

Indicates the SAX parser used to parse the current document

  • return: Either "SAXY" or "EXPAT"
string parsedBy ()
parseXML (line 1489)

Parses an xml string

  • return: True if parsing is successful
boolean parseXML (string $xmlText, [boolean $useSAXY = true], [boolean $preserveCDATA = true], [boolean $fireLoadEvent = false])
  • string $xmlText: The xml text to be parsed
  • boolean $useSAXY: True if SAXY is to be used instead of Expat
  • boolean $preserveCDATA: False if CDATA Section are to be generated as Text nodes
  • boolean $fireLoadEvent: True if onLoad is to be called on each node after parsing
removeChild (line 1191)

Removes a node from the childNodes list of the current node

  • return: The removed node
Object &removeChild (Object &$oldChild)
  • Object &$oldChild: The node to be removed

Redefinition of:
DOMIT_ChildNodes_Interface::removeChild()
Removes a node from the childNodes list of the current node
replaceChild (line 1071)

Replaces a node with another

  • return: The new node
Object &replaceChild (Object &$newChild, Object &$oldChild)
  • Object &$newChild: The new node
  • Object &$oldChild: The old node

Redefinition of:
DOMIT_ChildNodes_Interface::replaceChild()
Replaces a node with another
resolveErrors (line 815)

Specifies whether DOMIT! will try to fix invalid XML before parsing begins

void resolveErrors (boolean $truthVal)
  • boolean $truthVal: True if errors are to be resolved
saveTextToFile (line 1584)

Saves text to a file

  • return: True if the save is successful
boolean saveTextToFile (string $filename, string $text)
  • string $filename: The file path
  • string $text: The text to be saved
saveXML (line 1567)

Saves the current DOM document as an xml file

  • return: True if save is successful
boolean saveXML (string $filename, [boolean $normalized = false])
  • string $filename: The path of the xml file
  • boolean $normalized: True if xml text is to be normalized before saving
setAuthorization (line 847)

Specifies basic authentication for an http connection

void setAuthorization (string $user, string $password)
  • string $user: The user name
  • string $password: The password
setConnection (line 836)

Specifies the parameters of the http conection used to obtain the xml data

void setConnection (string $host, [string $path = '/'], [int $port = 80], int $timeout, [string $user = null], [string $password = null])
  • string $host: The ip address or domain name of the connection
  • string $path: The path of the connection
  • int $port: The port that the connection is listening on
  • int $timeout: The timeout value for the connection
  • string $user: The user name, if authentication is required
  • string $password: The password, if authentication is required
setDocumentElement (line 909)

Set the specified node as document element

  • return: The new document element
Object &setDocumentElement (Object &$node)
  • Object &$node: The node that is to become document element
setNamespaceAwareness (line 823)

Specifies whether DOMIT! processes namespace information

void setNamespaceAwareness (boolean $truthVal)
  • boolean $truthVal: True if namespaces are to be processed
setProxyAuthorization (line 871)

Specifies basic authentication for the proxy

void setProxyAuthorization (string $user, string $password)
  • string $user: The user name
  • string $password: The password
setProxyConnection (line 860)

Specifies that a proxy is to be used to obtain the xml data

void setProxyConnection (string $host, [string $path = '/'], [int $port = 80], int $timeout, [string $user = null], [string $password = null])
  • string $host: The ip address or domain name of the proxy
  • string $path: The path to the proxy
  • int $port: The port that the proxy is listening on
  • int $timeout: The timeout value for the connection
  • string $user: The user name, if authentication is required
  • string $password: The password, if authentication is required
toArray (line 1682)

Generates an array representation of the node and its children

  • return: A representation of the node and its children
Array toArray ()

Redefinition of:
DOMIT_Node::toArray()
Generates an array representation of the node and its children
toString (line 1729)

Generates a string representation of the node and its children

  • return: The string representation
string toString ([boolean $htmlSafe = false], [boolean $subEntities = true])
  • boolean $htmlSafe: True if HTML readable output is desired
  • boolean $subEntities: True if illegal xml characters in text nodes and attributes should be converted to entities
_importNode (line 947)

Imports a node (and optionally its children) from another DOM Document

  • return: imported node if it is the top level node, otherwise null
object The &_importNode (object A &$parentNode, object A &$sourceNode, boolean $deep)
  • object A &$parentNode: reference to the parent of the node to be imported
  • object A &$sourceNode: reference to the node to be imported
  • boolean $deep: True if the children of the imported node are also to be imported

Inherited Methods

Inherited From DOMIT_ChildNodes_Interface

DOMIT_ChildNodes_Interface::DOMIT_ChildNodes_Interface()
DOMIT_ChildNodes_Interface::appendChild()
DOMIT_ChildNodes_Interface::getElementsByAttribute()
DOMIT_ChildNodes_Interface::insertBefore()
DOMIT_ChildNodes_Interface::removeChild()
DOMIT_ChildNodes_Interface::replaceChild()
DOMIT_ChildNodes_Interface::selectNodes()
DOMIT_ChildNodes_Interface::_getElementsByAttribute()

Inherited From DOMIT_Node

DOMIT_Node::DOMIT_Node()
DOMIT_Node::appendChild()
DOMIT_Node::clearReferences()
DOMIT_Node::cloneNode()
DOMIT_Node::forHTML()
DOMIT_Node::getChildNodeIndex()
DOMIT_Node::getElementsByAttributePath()
DOMIT_Node::getElementsByPath()
DOMIT_Node::getNamedElements()
DOMIT_Node::getText()
DOMIT_Node::getTypedNodes()
DOMIT_Node::getValuedNodes()
DOMIT_Node::hasAttributes()
DOMIT_Node::hasChildNodes()
DOMIT_Node::insertBefore()
DOMIT_Node::isSupported()
DOMIT_Node::normalize()
DOMIT_Node::nvl()
DOMIT_Node::onLoad()
DOMIT_Node::removeChild()
DOMIT_Node::replaceChild()
DOMIT_Node::setOwnerDocument()
DOMIT_Node::toArray()
DOMIT_Node::toNormalizedString()
DOMIT_Node::_constructor()

Documentation generated on Fri, 4 Mar 2005 13:57:45 +1000 by phpDocumentor 1.3.0RC3