| Invokes the Expat parser and parses the specified $xmlText into $myXMLDoc. |
Signature: parse (& $myXMLDoc, $xmlText, $preserveCDATA = true) |
Parameters:
DOMIT_Document myXMLDoc - The DOMIT_Document to be populated.
String xmlText - The xml string to be parsed.
boolean preserveCDATA - True if CDATASection tags are to be preserved, false if they are to be converted to Text nodes.
|
Returns:
boolean - True if the text is valid XML, false if invalid.
|
| Invokes the SAXY parser and parses the specified $xmlText into $myXMLDoc. |
Signature: parseSAXY(& $myXMLDoc, $xmlText, $preserveCDATA) |
Parameters:
DOMIT_Document myXMLDoc - The DOMIT_Document to be populated.
String xmlText - The xml string to be parsed.
boolean preserveCDATA - True if CDATASection tags are to be preserved, false if they are to be converted to Text nodes.
|
Returns:
boolean - True if the text is valid XML, false if invalid.
|
| Generates and appends a new text node from the parseContainer text. |
Signature: dumpTextNode() |
| Captures the tag name and attributes of an xml element, then builds the element and appends it to the current DOMIT_Document. |
Signature: startElement(&$parser, $name, $attrs) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String name - The name of the current element tag.
array attributes - An associative array containing the names / values of the element's attributes.
|
| Catches a start element event (namespace aware) and processes the data. |
Signature: startElementNS(&$parser, $name, $attrs) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String name - The name of the current element tag.
array attributes - An associative array containing the names / values of the element's attributes.
|
| Captures the end element event. |
Signature: endElement(&$parser, $name) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String name - The name of the current element tag.
|
| Captures the text data from TextNodes (and CDATASection nodes, if requested) and builds these nodes and adds them to the DOMIT_Document. |
Signature: dataElement(&$parser, $data) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String data - The textual data of the node.
|
| Captures the text data from CDATASection node, builds these nodes, and adds them to the DOMIT_Document. |
Signature: cdataElement(&$parser, $data) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String data - The textual data of the node.
|
| For Expat parsing, captures any xml data that is not explicitly trapped for (such as CDATASection tags). |
Signature: defaultDataElement(&$parser, $data) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String data - The textual data of the node.
|
| Captures the text data from the doctype (if one exists) and adds it to the DOMIT_Document (not present in DOMIT! Lite). |
Signature: doctypeElement(&$parser, $data) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String data - The textual data of the doctype node.
|
| Captures the comment text from comment nodes, builds these nodes, and adds them to the DOMIT_Document (not present in DOMIT! Lite). |
Signature: commentElement(&$parser, $data) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String data - The textual data of the comment node.
|
| Captures the text of the target and data for the processing instruction node, builds these nodes, and adds them to the DOMIT_Document (not present in DOMIT! Lite). |
Signature: processingInstructionElement(&$parser, $target, $data) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String target - The target of the node.
String data - The textual data of the node.
|
| Catches a start namespace declaration event and processes the data. |
Signature: startNamespaceDeclaration(&$parser, $prefix, $uri) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String prefix - The prefix of the current namespace.
String uri - The uri of the current namespace.
|
| Catches an end namespace declaration event. |
Signature: endNamespaceDeclaration(&$parser, $prefix) |
Parameters:
Object parser - The instance of the XML parser doing the parsing.
String prefix - The prefix of the current namespace.
|