Class SAXY_Parser

Description

The SAX Parser class

Located in /includes/domit/xml_saxy_parser.php (line 96)

SAXY_Parser_Base
   |
   --SAXY_Parser
Variable Summary
Method Summary
SAXY_Parser SAXY_Parser ()
void detectStartNamespaceDeclaration (Array $myAttributes)
void expandAttributePrefixes (Array &$myAttributes)
string expandNamespacePrefix (string $tagName)
void fireCommentEvent (string $data)
void fireDTDEvent (string $data)
void fireEndNamespaceDeclarationEvent (string $prefix)
void fireProcessingInstructionEvent (string $target, mixed $data)
void fireStartNamespaceDeclarationEvent (string $prefix, string $uri)
string getNamespaceURI (string $prefix)
Object getVersion ()
boolean parse (string $xmlText)
void parseComment (string $data)
void parseProcessingInstruction (string $data)
void parseTag (string $tagText)
string preprocessXML (string $xmlText)
void setNamespaceAwareness (boolean $isNamespaceAware)
string xml_error_string (int $code)
void xml_set_comment_handler (mixed $handler)
void xml_set_doctype_handler (mixed $handler)
void xml_set_end_namespace_decl_handler (mixed $handler)
void xml_set_start_namespace_decl_handler (mixed $handler)
void _fireEndElementEvent (string $tagName)
void _fireStartElementEvent (string $tagName, Array &$myAttributes)
Variables
Object $commentHandler = null (line 102)
  • var: A reference to the Comment event handler
array $defaultNamespaceStack = array() (line 116)
  • var: A track used to track the uri of the current default namespace
Object $DTDHandler = null (line 100)
  • var: A reference to the DocType event handler
array $elementNameStack = array() (line 118)
  • var: A stack containing tag names of unclosed elements
Object $endNamespaceDeclarationHandler = null (line 108)
  • var: A reference to the End Namespace Declaration event handler
int $errorCode = SAXY_XML_ERROR_NONE (line 98)
  • var: The current error number
boolean $isNamespaceAware = false (line 110)
  • var: True if SAXY takes namespaces into consideration when parsing element tags
array $namespaceMap = array() (line 112)
  • var: An indexed array containing associative arrays of namespace prefixes mapped to their namespace URIs
array $namespaceStack = array() (line 114)
  • var: A stack used to determine when an end namespace event should be fired
Object $processingInstructionHandler = null (line 104)
  • var: A reference to the Processing Instruction event handler
Object $startNamespaceDeclarationHandler = null (line 106)
  • var: A reference to the Start Namespace Declaration event handler

Inherited Variables

Inherited from SAXY_Parser_Base

SAXY_Parser_Base::$cDataSectionHandler
SAXY_Parser_Base::$characterDataHandler
SAXY_Parser_Base::$charContainer
SAXY_Parser_Base::$convertEntities
SAXY_Parser_Base::$definedEntities
SAXY_Parser_Base::$endElementHandler
SAXY_Parser_Base::$predefinedEntities
SAXY_Parser_Base::$startElementHandler
SAXY_Parser_Base::$state
Methods
Constructor SAXY_Parser (line 124)

Constructor for SAX parser

SAXY_Parser SAXY_Parser ()
detectEndNamespaceDeclaration (line 663)

Determines whether an end namespace declaration event should be fired

void detectEndNamespaceDeclaration ()
detectStartNamespaceDeclaration (line 589)

Searches the attributes array for an xmlns declaration and fires an event if found

void detectStartNamespaceDeclaration (Array $myAttributes)
  • Array $myAttributes: The start element attributes
expandAttributePrefixes (line 516)

Expands attribute prefixes to full namespace uri

void expandAttributePrefixes (Array &$myAttributes)
  • Array &$myAttributes: The start element attributes
expandNamespacePrefix (line 539)

Expands the namespace prefix (if one exists) to the full namespace uri

  • return: The tagName, with the prefix expanded to the namespace uri
string expandNamespacePrefix (string $tagName)
  • string $tagName: The tagName with the namespace prefix
fireCommentEvent (line 723)

Fires a comment event

void fireCommentEvent (string $data)
  • string $data: The text of the comment
fireDTDEvent (line 715)

Fires a doctype event

void fireDTDEvent (string $data)
  • string $data: The doctype data
fireEndNamespaceDeclarationEvent (line 748)

Fires an end namespace declaration event

void fireEndNamespaceDeclarationEvent (string $prefix)
  • string $prefix: The namespace prefix
fireProcessingInstructionEvent (line 731)

Fires a processing instruction event

void fireProcessingInstructionEvent (string $target, mixed $data)
  • string $target: The processing instruction data
fireStartNamespaceDeclarationEvent (line 740)

Fires a start namespace declaration event

void fireStartNamespaceDeclarationEvent (string $prefix, string $uri)
  • string $prefix: The namespace prefix
  • string $uri: The namespace uri
getNamespaceURI (line 567)

Searches the namespaceMap for the specified prefix, and returns the full namespace URI

  • return: The namespace uri
string getNamespaceURI (string $prefix)
  • string $prefix: The namespace prefix
getVersion (line 181)

Returns the current version of SAXY

  • return: The current version of SAXY
Object getVersion ()
parse (line 320)

The controlling method for the parsing process

  • return: True if parsing is successful
boolean parse (string $xmlText)
  • string $xmlText: The xml text to be processed
parseComment (line 705)

Parses a comment

void parseComment (string $data)
  • string $data: The interior text of the comment
parseProcessingInstruction (line 682)

Parses a processing instruction

void parseProcessingInstruction (string $data)
  • string $data: The interior text of the processing instruction
parseTag (line 397)

Parses an element tag

void parseTag (string $tagText)
  • string $tagText: The interior text of the element tag
preprocessXML (line 190)

Processes the xml prolog, doctype, and any other nodes that exist outside of the main xml document

  • return: The preprocessed xml text
string preprocessXML (string $xmlText)
  • string $xmlText: The xml text to be processed
setNamespaceAwareness (line 173)

Specifies whether SAXY is namespace sensitive

void setNamespaceAwareness (boolean $isNamespaceAware)
  • boolean $isNamespaceAware: True if SAXY is namespace aware
xml_error_string (line 765)

Returns a textual description of the error code

  • return: The error message
string xml_error_string (int $code)
  • int $code: The error code
xml_get_error_code (line 756)

Returns the current error code

  • return: The current error code
int xml_get_error_code ()
xml_set_comment_handler (line 141)

Sets a reference to the handler for the Comment event

void xml_set_comment_handler (mixed $handler)
  • mixed $handler: A reference to the Comment handler
xml_set_doctype_handler (line 133)

Sets a reference to the handler for the DocType event

void xml_set_doctype_handler (mixed $handler)
  • mixed $handler: A reference to the DocType handler
xml_set_end_namespace_decl_handler (line 165)

Sets a reference to the handler for the End Namespace Declaration event

void xml_set_end_namespace_decl_handler (mixed $handler)
  • mixed $handler: A reference to the Start Namespace Declaration handler
xml_set_processing_instruction_handler (line 149)

Sets a reference to the handler for the Processing Instruction event

void xml_set_processing_instruction_handler (mixed $handler)
  • mixed $handler: A reference to the Processing Instruction handler
xml_set_start_namespace_decl_handler (line 157)

Sets a reference to the handler for the Start Namespace Declaration event

void xml_set_start_namespace_decl_handler (mixed $handler)
  • mixed $handler: A reference to the Start Namespace Declaration handler
_fireEndElementEvent (line 641)

Fires an end element event and pops the element name from the elementName stack

void _fireEndElementEvent (string $tagName)
  • string $tagName: The end element tag name
_fireStartElementEvent (line 499)

Fires a start element event and pushes the element name onto the elementName stack

void _fireStartElementEvent (string $tagName, Array &$myAttributes)
  • string $tagName: The start element tag name
  • Array &$myAttributes: The start element attributes

Inherited Methods

Inherited From SAXY_Parser_Base

SAXY_Parser_Base::SAXY_Parser_Base()
SAXY_Parser_Base::appendEntityTranslationTable()
SAXY_Parser_Base::convertEntities()
SAXY_Parser_Base::fireCDataSectionEvent()
SAXY_Parser_Base::fireCharacterDataEvent()
SAXY_Parser_Base::fireEndElementEvent()
SAXY_Parser_Base::fireStartElementEvent()
SAXY_Parser_Base::getCharFromEnd()
SAXY_Parser_Base::parseAttributes()
SAXY_Parser_Base::parseBetweenTags()
SAXY_Parser_Base::xml_set_cdata_section_handler()
SAXY_Parser_Base::xml_set_character_data_handler()
SAXY_Parser_Base::xml_set_element_handler()

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