| Returns a readable representation of the current xml document or node. Called by the DOMIT! method by the same name. |
Signature: toNormalizedString (&$node, $subEntities=false, $definedEntities) |
Parameters:
DOMIT_Node node - The node which is to be rendered as a string.
boolean subEntities - True if entity substitution is to be performed.
Array definedEntities - A user defined translation table of entities and their replacement values.
|
Returns:
String - A readable representation of the current xml document or node.
|
| Returns a readable representation of the current xml node. Called by the toNormalizedString() method. |
Signature: getNormalizedString(&$node, $node_level, $subEntities=false, $definedEntities |
Parameters:
DOMIT_Node node - The current node to be normalized.
int node_level - The level in the xml tree of the current node.
boolean subEntities - True if entity substitution is to be performed.
Array definedEntities - A user defined translation table of entities and their replacement values.
|
Returns:
String - A readable representation of the current node.
|
| Converts illegal XML characters to their entity representations. |
Signature: convertEntities($text, $definedEntities) |
Parameters:
string text - The text on which the entity conversion is to be performed.
Array definedEntities - A user defined translation table of entities and their replacement values.
|
Returns:
String - The entity converted text.
|
| Gets a normalized (formatted for readability) representation of the current element |
Signature: getNormalizedElementString(&$node, $response, $node_level, $subEntities, $definedEntities) |
Parameters:
DOMIT_Node node - The node to be normalized.
string response - The current normalized text.
int node_level - The level in the DOM hierarchy where the node is located.
boolean subEntities - True if illegal xml characters in text nodes and attributes should be converted to entities.
Array definedEntities - A user defined translation table of entities and their replacement values.
|
Returns:
String - The normalized string representation.
|
| Determines whether the specified node is a Text node. |
Signature: isTextNode($node) |
Parameters:
DOMIT_Node node - The node to be tested.
|
Returns:
boolean - True if the node is a Text node.
|
| Sets the indentation for the normalization of the current node. |
Signature: getIndentation($node_level) |
Parameters:
int node_level - The level in the xml tree of the current node.
|
Returns:
String - A sequence of spaces corresponding to the indentation width.
|
| Performs some minor validation of the xml string about to be parsed. Note that this does not validate against a DTD or XML Schema Definition. |
Signature: validateXML($xmlText) |
Parameters:
String xmlText - The xml string to be validated.
|
Returns:
boolean - True is valid, false if invalid.
|