Class DOMIT_Parser

Description

Manages the generation of a DOMIT! document from SAX events

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


	
			
Variable Summary
Object $currentNode
boolean $inCDATASection
boolean $inTextNode
Object $lastChild
string $parseItem
boolean $preserveCDATA
Object $xmlDoc
Method Summary
void cdataElement (Object &$parser, string $data)
void commentElement (Object &$parser, string $data)
void dataElement (Object &$parser, string $data)
void defaultDataElement (Object &$parser, string $data)
void doctypeElement (Object &$parser, string $data)
void dumpTextNode ()
void endElement (Object &$parser, string $name)
void endNamespaceDeclaration (Object &$parser, string $prefix)
void notationElement (Object &$parser, string $data)
boolean parse (Object &$myXMLDoc, string $xmlText, [boolean $preserveCDATA = true])
boolean parseSAXY (Object &$myXMLDoc, string $xmlText, [boolean $preserveCDATA = true], mixed $definedEntities)
void processingInstructionElement (Object &$parser, string $target, string $data)
void startElement (Object &$parser, string $name, Array $attrs)
void startElementNS (Object &$parser, string $name, Array $attrs)
void startNamespaceDeclaration (Object &$parser, string $prefix, string $uri)
Variables
Object $currentNode = null (line 3018)
  • var: A reference to the current node in the parsing process
boolean $inCDATASection = false (line 3022)
  • var: True if currently parsing a CDATA Section
boolean $inTextNode = false (line 3024)
  • var: True if currently parsing a Text node
Object $lastChild = null (line 3020)
  • var: A reference to the last child in the parsing process
array $namespaceURIMap = array() (line 3032)
  • var: An array of namespacesURIs mapped to prefixes
string $parseContainer = '' (line 3028)
  • var: A container for holding the currently parsed text data
string $parseItem = '' (line 3030)
  • var: The current docutype text
boolean $preserveCDATA (line 3026)
  • var: True is CDATA Section nodes are not to be converted into Text nodes
Object $xmlDoc = null (line 3016)
  • var: A reference to the resulting xmldoc
Methods
cdataElement (line 3266)

Catches a CDATA Section event and processes the text

void cdataElement (Object &$parser, string $data)
  • Object &$parser: A reference to the current SAX parser
  • string $data: The current text data
commentElement (line 3372)

Catches a comment node event and processes the data

void commentElement (Object &$parser, string $data)
  • Object &$parser: A reference to the current SAX parser
  • string $data: The comment data
dataElement (line 3253)

Catches a data event and processes the text

void dataElement (Object &$parser, string $data)
  • Object &$parser: A reference to the current SAX parser
  • string $data: The current text data
defaultDataElement (line 3277)

Catches a default data event and processes the data

void defaultDataElement (Object &$parser, string $data)
  • Object &$parser: A reference to the current SAX parser
  • string $data: The current data
doctypeElement (line 3342)

Catches a doctype event and processes the data

void doctypeElement (Object &$parser, string $data)
  • Object &$parser: A reference to the current SAX parser
  • string $data: The current data
dumpTextNode (line 3146)

Generates and appends a new text node from the parseContainer text

void dumpTextNode ()
endElement (line 3240)

Catches an end element event and processes the data

void endElement (Object &$parser, string $name)
  • Object &$parser: A reference to the current SAX parser
  • string $name: The tag name of the current element
endNamespaceDeclaration (line 3416)

Catches an end namespace declaration event

void endNamespaceDeclaration (Object &$parser, string $prefix)
  • Object &$parser: A reference to the current SAX parser
  • string $prefix: The namespace prefix
notationElement (line 3360)

Catches a notation node event and processes the data

void notationElement (Object &$parser, string $data)
  • Object &$parser: A reference to the current SAX parser
  • string $data: The current notation data
parse (line 3041)

Parses xml text using Expat

  • return: True if the parsing is successful
boolean parse (Object &$myXMLDoc, string $xmlText, [boolean $preserveCDATA = true])
  • Object &$myXMLDoc: A reference to the DOM document that the xml is to be parsed into
  • string $xmlText: The text to be parsed
  • boolean $preserveCDATA: True if CDATA Section nodes are not to be converted into Text nodes
parseSAXY (line 3105)

Parses xml text using SAXY

  • return: True if the parsing is successful
boolean parseSAXY (Object &$myXMLDoc, string $xmlText, [boolean $preserveCDATA = true], mixed $definedEntities)
  • Object &$myXMLDoc: A reference to the DOM document that the xml is to be parsed into
  • string $xmlText: The text to be parsed
  • boolean $preserveCDATA: True if CDATA Section nodes are not to be converted into Text nodes
processingInstructionElement (line 3387)

Catches a processing instruction node event and processes the data

void processingInstructionElement (Object &$parser, string $target, string $data)
  • Object &$parser: A reference to the current SAX parser
  • string $target: The target of the processing instruction data
  • string $data: The processing instruction data
startElement (line 3159)

Catches a start element event and processes the data

void startElement (Object &$parser, string $name, Array $attrs)
  • Object &$parser: A reference to the current SAX parser
  • string $name: The tag name of the current element
  • Array $attrs: An array of the element attributes
startElementNS (line 3182)

Catches a start element event and processes the data

void startElementNS (Object &$parser, string $name, Array $attrs)
  • Object &$parser: A reference to the current SAX parser
  • string $name: The tag name of the current element
  • Array $attrs: An array of the element attributes
startNamespaceDeclaration (line 3406)

Catches a start namespace declaration event and processes the data

void startNamespaceDeclaration (Object &$parser, string $prefix, string $uri)
  • Object &$parser: A reference to the current SAX parser
  • string $prefix: The namespace prefix
  • string $uri: The namespace uri

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