DOM Document constructor
DOMIT_Lite_Document
DOMIT_Lite_Document
()
Appends a node to the childNodes list of the current node
Object
&appendChild
(Object &$node)
-
Object
&$node: The node to be appended
Redefinition of:
- DOMIT_Lite_ChildNodes_Interface::appendChild()
- Appends a node to the childNodes list of the current node
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('&' => '&');
Copies a 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_Lite_Node::cloneNode()
- Copies a node and/or its children
Creates a new DOMIT_Lite_CDATASection node
Object
&createCDATASection
(string $data)
-
string
$data: The text of the CDATASection
Creates a new DOMIT_Lite_Element node
Object
&createElement
(string $tagName)
-
string
$tagName: The tag name of the element
Creates a new DOMIT_Text node
Object
&createTextNode
(string $data)
-
string
$data: The text of the node
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)
Returns the doctype text
string
getDocType
()
Returns a reference to the DOMIT_DOMImplementation object
Object
&getDOMImplementation
()
Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
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_Lite_Node::getElementsByPath()
- Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
Retrieves a NodeList of child elements with the specified tag name
Object
&getElementsByTagName
(string $tagName)
-
string
$tagName: The matching element tag name
Returns the error code from the underlying SAX parser
int
getErrorCode
()
Returns the error string from the underlying SAX parser
string
getErrorString
()
Returns the concatented text of the current node and its children
string
getText
()
Redefinition of:
- DOMIT_Lite_Node::getText()
- Returns the concatented text of the current node and its children
Retrieves text from a file
string
getTextFromFile
(string $filename)
-
string
$filename: The file path
Returns the current version of DOMIT! Lite
Object
getVersion
()
Returns the xml declaration text
mixed
getXMLDeclaration
()
Inserts a node to the childNodes list of the current 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_Lite_ChildNodes_Interface::insertBefore()
- Inserts a node to the childNodes list of the current node
Manages the firing of the onLoad() event
void
load
(Object &$contextNode)
-
Object
&$contextNode: The parent node of the current recursion
Parses an xml file
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
Parses an xml file; first encodes text as UTF-8
boolean
loadXML_utf8
(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
Indicates the SAX parser used to parse the current document
string
parsedBy
()
Parses an xml string
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
Parses an xml string; first encodes string as UTF-8
boolean
parseXML_utf8
(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
Removes a node from the childNodes list of the current node
Object
&removeChild
(Object &$oldChild)
-
Object
&$oldChild: The node to be removed
Redefinition of:
- DOMIT_Lite_ChildNodes_Interface::removeChild()
- Removes a node from the childNodes list of the current node
Replaces a node with another
Object
&replaceChild
(Object &$newChild, Object &$oldChild)
-
Object
&$newChild: The new node
-
Object
&$oldChild: The old node
Redefinition of:
- DOMIT_Lite_ChildNodes_Interface::replaceChild()
- Replaces a node with another
Specifies whether DOMIT! Lite will try to fix invalid XML before parsing begins
void
resolveErrors
(boolean $truthVal)
-
boolean
$truthVal: True if errors are to be resolved
Saves text to a file
boolean
saveTextToFile
(string $filename, string $text)
-
string
$filename: The file path
-
string
$text: The text to be saved
Saves the current DOM document as an xml file
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
Saves the current DOM document as an xml file; first encodes text as UTF-8
boolean
saveXML_utf8
(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
Specifies basic authentication for an http connection
void
setAuthorization
(string $user, string $password)
-
string
$user: The user name
-
string
$password: The password
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
Set the specified node as document element
Object
&setDocumentElement
(Object &$node)
-
Object
&$node: The node that is to become document element
Specifies basic authentication for the proxy
void
setProxyAuthorization
(string $user, string $password)
-
string
$user: The user name
-
string
$password: The password
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
Returns the xml declaration text
mixed
setXMLDeclaration
(mixed $decl)
Generates an array representation of the node and its children
Array
toArray
()
Redefinition of:
- DOMIT_Lite_Node::toArray()
- Generates an array representation of the node and its children
Generates a string representation of the node and its children
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
Inherited Methods
Inherited From DOMIT_Lite_ChildNodes_Interface
DOMIT_Lite_ChildNodes_Interface::DOMIT_Lite_ChildNodes_Interface()
DOMIT_Lite_ChildNodes_Interface::appendChild()
DOMIT_Lite_ChildNodes_Interface::getElementsByAttribute()
DOMIT_Lite_ChildNodes_Interface::insertBefore()
DOMIT_Lite_ChildNodes_Interface::removeChild()
DOMIT_Lite_ChildNodes_Interface::replaceChild()
DOMIT_Lite_ChildNodes_Interface::_getElementsByAttribute()
Inherited From DOMIT_Lite_Node
DOMIT_Lite_Node::DOMIT_Lite_Node()
DOMIT_Lite_Node::appendChild()
DOMIT_Lite_Node::clearReferences()
DOMIT_Lite_Node::cloneNode()
DOMIT_Lite_Node::forHTML()
DOMIT_Lite_Node::getChildNodeIndex()
DOMIT_Lite_Node::getElementsByPath()
DOMIT_Lite_Node::getNamedElements()
DOMIT_Lite_Node::getText()
DOMIT_Lite_Node::hasChildNodes()
DOMIT_Lite_Node::insertBefore()
DOMIT_Lite_Node::nvl()
DOMIT_Lite_Node::onLoad()
DOMIT_Lite_Node::removeChild()
DOMIT_Lite_Node::replaceChild()
DOMIT_Lite_Node::setOwnerDocument()
DOMIT_Lite_Node::toArray()
DOMIT_Lite_Node::toNormalizedString()
DOMIT_Lite_Node::_constructor()