Main Page Modules Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACEXML_Parser Class Reference

A SAX based parser. More...

`#include <Parser.h>`

Inheritance diagram for ACEXML_Parser:

[legend]
Collaboration diagram for ACEXML_Parser:

[legend]
List of all members.

## Public Methods

| ACEXML_Parser (void)
| Default constructor.
virtual | ~ACEXML_Parser (void)
| Destructor.
int | initialize (ACEXML_InputSource *input)
virtual ACEXML_ContentHandler * | getContentHandler (void) const
virtual ACEXML_DTDHandler * | getDTDHandler (void) const
virtual ACEXML_EntityResolver * | getEntityResolver (void) const
virtual ACEXML_ErrorHandler * | getErrorHandler (void) const
virtual int | getFeature (const ACEXML_Char *name ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException
virtual void | setFeature (const ACEXML_Char *name, int boolean_value ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException
virtual void * | getProperty (const ACEXML_Char *name ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException
virtual void | setProperty (const ACEXML_Char *name, void *value ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException
virtual void | parse (ACEXML_InputSource *input ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
virtual void | parse (const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
virtual void | setContentHandler (ACEXML_ContentHandler *handler)
virtual void | setDTDHandler (ACEXML_DTDHandler *handler)
virtual void | setEntityResolver (ACEXML_EntityResolver *resolver)
virtual void | setErrorHandler (ACEXML_ErrorHandler *handler)

## Public Attributes

virtual int | ACEXML_SAXNotSupportedException
virtual void | ACEXML_SAXNotSupportedException
virtual void * | ACEXML_SAXNotSupportedException

## Protected Methods

void | parse_xml_prolog (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
void | parse_version_info (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
void | parse_encoding_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
void | parse_xml_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_text_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_processing_instruction (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_doctypedecl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
void | parse_element (int is_root ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_content (const ACEXML_Char *startname, const ACEXML_Char *ns_uri, const ACEXML_Char *ns_lname ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_char_reference (ACEXML_Char *buf, size_t &len)
ACEXML_Char * | parse_reference_name (void)
int | parse_cdata (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_internal_dtd (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_comment (void)
int | parse_element_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_entity_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_attlist_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_atttype (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_notation_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_external_id (ACEXML_Char *&publicId, ACEXML_Char *&systemId ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_external_dtd (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_external_subset (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_markup_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_conditional_section (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_includesect (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_ignoresect (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_PE_reference (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_entity_reference (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_entity_value (ACEXML_Char *&str ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_defaultdecl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_children_definition (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_child (int skip_open_paren ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
ACEXML_Char * | parse_name (ACEXML_Char ch=0)
ACEXML_Char * | parse_nmtoken (ACEXML_Char ch=0)
int | parse_version (ACEXML_Char *&str)
int | parse_version_num (ACEXML_Char *&str)
int | parse_encname (ACEXML_Char *&str)
int | parse_sddecl (ACEXML_Char *&str)
ACEXML_Char * | parse_attname (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_attvalue (ACEXML_Char *&str ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_tokenized_type (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_system_literal (ACEXML_Char *&str)
int | parse_pubid_literal (ACEXML_Char *&str)
int | is_whitespace (const ACEXML_Char c) const
int | isChar (ACEXML_UCS4 c) const
int | isCharRef (const ACEXML_Char c) const
int | isBasechar (const ACEXML_Char c) const
int | isIdeographic (const ACEXML_Char c) const
int | isCombiningchar (const ACEXML_Char c) const
int | isDigit (const ACEXML_Char c) const
int | isExtender (const ACEXML_Char c) const
int | isLetter (const ACEXML_Char c) const
int | isNameChar (const ACEXML_Char c) const
int | isPubidChar (const ACEXML_Char c) const
virtual ACEXML_Char | get (void)
| Get a character.
virtual ACEXML_Char | peek (void)
| Peek a character.

## Private Methods

ACEXML_Char | skip_whitespace (void)
int | skip_whitespace_count (ACEXML_Char *peek=0)
int | skip_equal (void)
int | get_quoted_string (ACEXML_Char *&str)
int | isNormalDigit (const ACEXML_Char c) const
void | error (const ACEXML_Char *msg ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
void | warning (const ACEXML_Char *msg ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
void | fatal_error (const ACEXML_Char *msg ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
void | prefix_mapping (const ACEXML_Char *prefix, const ACEXML_Char *uri, const ACEXML_Char *name, int start ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
int | parse_token (const ACEXML_Char *keyword)
int | push_context (ACEXML_Parser_Context *context)
int | pop_context (int GE_ref ACEXML_ENV_ARG_DECL)
virtual int | switch_input (ACEXML_CharStream *cstream, const ACEXML_Char *systemId, const ACEXML_Char *publicId=0)
virtual int | switch_input (ACEXML_InputSource *input, const ACEXML_Char *systemId, const ACEXML_Char *publicId=0)
int | check_for_PE_reference (ACEXML_ENV_SINGLE_ARG_DECL)
void | reset (void)
ACEXML_Char * | normalize_systemid (const ACEXML_Char *systemId)

## Private Attributes

ACEXML_DTDHandler * | dtd_handler_
ACEXML_EntityResolver * | entity_resolver_
ACEXML_ContentHandler * | content_handler_
ACEXML_ErrorHandler * | error_handler_
ACEXML_Char * | doctype_
| Document Type.
ACEXML_Parser_Context * | current_
| Current parser context.
ACE_Unbounded_Stack< ACEXML_Parser_Context * > | ctx_stack_
| Stack used to hold the Parser_Context.
ACE_Unbounded_Stack< ACEXML_Char * > | GE_reference_
| Set used to hold the general entity references that are active.
ACE_Unbounded_Stack< ACEXML_Char * > | PE_reference_
| Set used to hold the parameter entity references that are active.
ACE_Obstack_T< ACEXML_Char > | obstack_
| Obstack used by the parser to hold all the strings parsed.
ACE_Obstack_T< ACEXML_Char > | alt_stack_
| Alternative obstack used to hold any strings when the original is in use.
ACEXML_NamespaceSupport | xml_namespace_
| Namespace stack used by the parser to implement support for Namespaces.
int | nested_namespace_
| T => We are processing a nested namespace.
ACEXML_Entity_Manager | internal_GE_
| Set of internal parsed general entities in the document.
ACEXML_Entity_Manager | external_GE_
| Set of external parsed general entities in the document.
ACEXML_Entity_Manager | unparsed_entities_
| Set of unparsed entities in the document.
ACEXML_Entity_Manager | predef_entities_
| Set of predefined entities used by the parser.
ACEXML_Entity_Manager | internal_PE_
| Set of internal parsed parameter entities in the document.
ACEXML_Entity_Manager | external_PE_
| Set of external parsed parameter entities in the document.
ACEXML_Entity_Manager | notations_
| Set of notations declared in the document.
ACEXML_ParserInt::ReferenceState | ref_state_
| State of the parser when it encounters a reference.
int | external_subset_
| T => We are parsing an external subset.
int | external_entity_
| T => We are parsing an external entity value.
int | has_pe_refs_
| T => Internal DTD has parameter entity references.
int | standalone_
| If set, the document is a standalone XML document.
int | external_dtd_
| If set, the document has an external DTD subset.
int | internal_dtd_
| If set, the document has an internal DTD.
int | simple_parsing_
int | validate_
| If set, the parser should also validate.
int | namespaces_
| If set, the parser should allow access by namespace qualified names.
int | namespace_prefixes_

## Static Private Attributes

const ACEXML_Char | simple_parsing_feature_ [] = ACE_TEXT ("Simple")
const ACEXML_Char | namespaces_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/namespaces")
const ACEXML_Char | namespace_prefixes_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/namespace-prefixes")
const ACEXML_Char | validation_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/validation")

## Detailed Description

A SAX based parser.

## Constructor & Destructor Documentation

ACEXML_Parser::ACEXML_Parser | ( | void |  | ) |

| Default constructor.

ACEXML_Parser::~ACEXML_Parser | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

int ACEXML_Parser::check_for_PE_reference | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[private]`

Check for a parameter entity reference. This is used to check for the occurence of a PE Reference withing markupDecl. Additionally this function consumes any leading or trailing whitespace around the PE Reference.

Return values:

  Number | of whitespace characters skipped.

void ACEXML_Parser::error | ( | const ACEXML_Char *msg | ACEXML_ENV_ARG_DECL | ) | `[private]`

| Dispatch errors to ErrorHandler.

void ACEXML_Parser::fatal_error | ( | const ACEXML_Char *msg | ACEXML_ENV_ARG_DECL | ) | `[private]`

| Dispatch fatal errors to ErrorHandler.

ACEXML_INLINE ACEXML_Char ACEXML_Parser::get | ( | void |  | ) | `[protected, virtual]`

| Get a character.

int ACEXML_Parser::get_quoted_string | ( | ACEXML_Char *& | str | ) | `[private]`

Get a quoted string. Quoted strings are used to specify attribute values and this routine will replace character and entity references on-the-fly. Parameter entities are not allowed (or replaced) in this function. (But regular entities are.)

Parameters:

  str | returns the un-quoted string.

Return values:

  0 | on success, -1 otherwise.

ACEXML_INLINE ACEXML_ContentHandler * ACEXML_Parser::getContentHandler | ( | void |  | ) | const`[virtual]`

| Return the current content handler. Implements ACEXML_XMLReader.

ACEXML_INLINE ACEXML_DTDHandler * ACEXML_Parser::getDTDHandler | ( | void |  | ) | const`[virtual]`

| Return the current DTD handler. Implements ACEXML_XMLReader.

ACEXML_INLINE ACEXML_EntityResolver * ACEXML_Parser::getEntityResolver | ( | void |  | ) | const`[virtual]`

| Return the current entity resolver. Implements ACEXML_XMLReader.

ACEXML_INLINE ACEXML_ErrorHandler * ACEXML_Parser::getErrorHandler | ( | void |  | ) | const`[virtual]`

| Return the current error handler. Implements ACEXML_XMLReader.

int ACEXML_Parser::getFeature | ( | const ACEXML_Char *name | ACEXML_ENV_ARG_DECL | ) | `[virtual]`

| Look up the value of a feature. This method allows programmers to check whether a specific feature has been activated in the parser. Reimplemented from ACEXML_XMLReader.

virtual void* ACEXML_Parser::getProperty | ( | const ACEXML_Char *name | ACEXML_ENV_ARG_DECL | ) | `[virtual]`

| Look up the value of a property. Reimplemented from ACEXML_XMLReader.

int ACEXML_Parser::initialize | ( | ACEXML_InputSource * | input | ) |

Initialize the parser state.

Return values:

  0 | if parser was initialized correctly else -1.

ACEXML_INLINE int ACEXML_Parser::is_whitespace | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is a whitespace.

Return values:

  1 | if c is a valid white space character. 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isBasechar | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is a BaseChar.

Return values:

  1 | if c is a valid BaseChar character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isChar | ( | ACEXML_UCS4 | c | ) | const`[protected]`

Check if a character c is a valid Char.

Return values:

  1 | if c is a valid character. 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isCharRef | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is a valid CharRef character.

Return values:

  1 | if c is a valid character reference character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isCombiningchar | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is a CombiningChar.

Return values:

  1 | if c is a valid CombiningChar character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isDigit | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is a Digit.

Return values:

  1 | if c is a valid Digit character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isExtender | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is an Extender.

Return values:

  1 | if c is a valid Extender character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isIdeographic | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is a Ideographic.

Return values:

  1 | if c is a valid Ideographic character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isLetter | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character c is a Letter.

Return values:

  1 | if c is a valid Letter character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isNameChar | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character is an acceptable NameChar.

Return values:

  1 | if c is a valid NameChar character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isNormalDigit | ( | const ACEXML_Char | c | ) | const`[private]`

Check if a character c is a Digit.

Return values:

  1 | if c is a valid Digit character, 0 otherwise.

ACEXML_INLINE int ACEXML_Parser::isPubidChar | ( | const ACEXML_Char | c | ) | const`[protected]`

Check if a character is a PubidChar.

Return values:

  1 | if c is a valid PubidChar character, 0 otherwise.

ACEXML_Char * ACEXML_Parser::normalize_systemid | ( | const ACEXML_Char * | systemId | ) | `[private]`

| Very trivial, non-conformant normalization of a systemid.

void ACEXML_Parser::parse | ( | const ACEXML_Char *systemId | ACEXML_ENV_ARG_DECL | ) | `[virtual]`

| Parse an XML document from a system identifier (URI). Implements ACEXML_XMLReader.

void ACEXML_Parser::parse | ( | ACEXML_InputSource *input | ACEXML_ENV_ARG_DECL | ) | `[virtual]`

| Parse an XML document. Implements ACEXML_XMLReader.

int ACEXML_Parser::parse_attlist_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse an "ATTLIST" decl. Thse first character this method expects is always the 'A' (the first char) in the word "ATTLIST".

Return values:

  0 | on success, -1 otherwise.

ACEXML_Char * ACEXML_Parser::parse_attname | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse an attribute name.

Return values:

  str | String containing the value of the attribute name if successful.
  0 | otherwise.

int ACEXML_Parser::parse_atttype | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a AttType declaration.

int ACEXML_Parser::parse_attvalue | ( | ACEXML_Char *&str | ACEXML_ENV_ARG_DECL | ) | `[protected]`

Parse an attribute value.

Parameters:

  str | String containing the value of the attribute if successful.

Returns:
  0 if attribute value was read successfully, -1 otherwise.

int ACEXML_Parser::parse_cdata | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse a CDATA section. The first character should always be the first '[' in CDATA definition.

Return values:

  0 | on success.
  -1 | if fail.

int ACEXML_Parser::parse_char_reference | ( | ACEXML_Char * | buf,
|  | size_t & | len
| ) | `[protected]`

Parse a character reference, i.e., "&x20;" or "&#30;". The first character encountered should be the '#' char.

Parameters:

  buf | points to a character buffer for the result.
  len | In/out argument which initially specifies the size of the buffer and is later set to the no. of characters in the reference.

Return values:

  0 | on success and -1 otherwise.

int ACEXML_Parser::parse_child | ( | int skip_open_paren | ACEXML_ENV_ARG_DECL | ) | `[protected]`

Parse a `cp` non-terminal. `cp` can either be a `seq` or a `choice`. This function calls itself recursively.

Parameters:

  skip_open_paren | when non-zero, it indicates that the open paren of the `seq` or `choice` has already been removed from the input stream.

Return values:

  0 | on success, -1 otherwise.

int ACEXML_Parser::parse_children_definition | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse the "children" and "Mixed" non-terminals in contentspec.

The first character this function sees must be the first open paren '(' in children.

Return values:

  0 | on success, -1 otherwise.

int ACEXML_Parser::parse_comment | ( | void |  | ) | `[protected]`

| Skip over a comment. The first character encountered should always be the first '-' in the comment prefix "<@!--".

int ACEXML_Parser::parse_conditional_section | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a conditionalSect declaration.

int ACEXML_Parser::parse_content | ( | const ACEXML_Char * | startname,
|  | const ACEXML_Char * | ns_uri,
|  | const ACEXML_Char *ns_lname | ACEXML_ENV_ARG_DECL
| ) | `[protected]`

| Parse a content declaration.

int ACEXML_Parser::parse_defaultdecl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a DefaultDecl specification.

int ACEXML_Parser::parse_doctypedecl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse the DOCTYPE declaration. The first character encountered should always be 'D' in doctype prefix: "<@!DOCTYPE".

void ACEXML_Parser::parse_element | ( | int is_root | ACEXML_ENV_ARG_DECL | ) | `[protected]`

Parse an XML element. The first character encountered should be the first character of the element "Name".

Parameters:

  is_root | If not 0, then we are expecting to see the "root" element now, and the next element's name need to match the name defined in DOCTYPE definition, i.e., this->doctype_.

Todo:
  Instead of simply checking for the root element based on the argument is_root, we should instead either pass in some sort of validator or allow the function to return the element name so it can be used in a validator.

int ACEXML_Parser::parse_element_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse an "ELEMENT" decl. The first character this method expects is always the 'L' (the second char) in the word "ELEMENT".

Return values:

  0 | on success, -1 otherwise.

int ACEXML_Parser::parse_encname | ( | ACEXML_Char *& | str | ) | `[protected]`

Parse the encoding name in an XML Prolog section.

Parameters:

  str | String containing the encoding name if successful.

Returns:
  0 if the string was read successfully, 0 otherwise.

void ACEXML_Parser::parse_encoding_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a EncodingDecl declaration.

int ACEXML_Parser::parse_entity_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse an "ENTITY" decl. The first character this method expects is always the 'N' (the second char) in the word "ENTITY".

Return values:

  0 | on success, -1 otherwise.

int ACEXML_Parser::parse_entity_reference | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a Reference.

int ACEXML_Parser::parse_entity_value | ( | ACEXML_Char *&str | ACEXML_ENV_ARG_DECL | ) | `[protected]`

| Parse an entityValue.

int ACEXML_Parser::parse_external_dtd | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse an external DTD.

int ACEXML_Parser::parse_external_id | ( | ACEXML_Char *& | publicId,
|  | ACEXML_Char *&systemId | ACEXML_ENV_ARG_DECL
| ) | `[protected]`

Parse an ExternalID or a reference to PUBLIC ExternalID. Possible cases are in the forms of: ``

SYSTEM 'quoted string representing system resource' PUBLIC 'quoted name of public ID' 'quoted resource' PUBLIC 'quoted name we are referring to'

The first character this function sees must be either 'S' or 'P'. When the function finishes parsing, the input stream points at the first non-whitespace character.

Parameters:

  publicId | returns the unquoted publicId read. If none is available, it will be reset to 0.
  systemId | returns the unquoted systemId read. If none is available, it will be reset to 0.

Return values:

  0 | on success, -1 otherwise.

int ACEXML_Parser::parse_external_subset | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse an external subset. This does the actual parsing of an external subset and is called by

See also:
  parse_external_dtd.

int ACEXML_Parser::parse_ignoresect | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a ignoreSect declaration.

int ACEXML_Parser::parse_includesect | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a includeSect declaration.

int ACEXML_Parser::parse_internal_dtd | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a "markupdecl" section, this includes both "markupdecl" and "DeclSep" sections in XML specification

int ACEXML_Parser::parse_markup_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a markupDecl section.

ACEXML_Char * ACEXML_Parser::parse_name | ( | ACEXML_Char | ch = 0 | ) | `[protected]`

Parse a name from the input CharStream. If ch @!= 0, then we have already consumed the first name character from the input CharStream, otherwise, parse_name will use this->get() to acquire the initial character.

Returns:
  A pointer to the string in the obstack, 0 if it's not a valid name.

ACEXML_Char * ACEXML_Parser::parse_nmtoken | ( | ACEXML_Char | ch = 0 | ) | `[protected]`

Parse a NMTOKEN from the input stream.

Returns:
  A pointer to the string in the obstack, 0 if it's not a valid NMTOKEN.

int ACEXML_Parser::parse_notation_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse a "NOTATION" decl. The first character this method expects is always the 'N' (the first char) in the word "NOTATION".

Return values:

  0 | on success, -1 otherwise.

int ACEXML_Parser::parse_PE_reference | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a PEReference.

int ACEXML_Parser::parse_processing_instruction | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse a PI statement. The first character encountered should always be '?' in the PI prefix "<?".

Return values:

  0 | on success, -1 otherwise.

int ACEXML_Parser::parse_pubid_literal | ( | ACEXML_Char *& | str | ) | `[protected]`

Parse a PubidLiteral.

Parameters:

  str | String containing the PubidLiteral if successful.

Returns:
  0 if the string was read successfully, 0 otherwise.

ACEXML_Char * ACEXML_Parser::parse_reference_name | ( | void |  | ) | `[protected]`

Parse a reference name, i.e., foo in "&foo;" or "foo;". The first character encountered should be the character following '&' or '%'. Effectively the same as

See also:
  parse_name but we don't use the parser's obstack. Caller is responsible for deleting the memory.

Return values:

  A | pointer to name of reference, 0 otherwise.

int ACEXML_Parser::parse_sddecl | ( | ACEXML_Char *& | str | ) | `[protected]`

Parse a SDDecl string.

Parameters:

  str | String containing the encoding name if successful.

Returns:
  0 if the string was read successfully, -1 otherwise.

int ACEXML_Parser::parse_system_literal | ( | ACEXML_Char *& | str | ) | `[protected]`

Parse a SystemLiteral.

Parameters:

  str | String containing the SystemLiteral if successful.

Returns:
  0 if the string was read successfully, 0 otherwise.

int ACEXML_Parser::parse_text_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a TextDecl declaration.

ACEXML_INLINE int ACEXML_Parser::parse_token | ( | const ACEXML_Char * | keyword | ) | `[private]`

| Parse a keyword.

int ACEXML_Parser::parse_tokenized_type | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

Parse a tokenized type attribute.

Returns:
  0 if attribute type was read successfully, -1 otherwise.

int ACEXML_Parser::parse_version | ( | ACEXML_Char *& | str | ) | `[protected]`

Parse the version string in an XML Prolog section.

Parameters:

  str | String containing the version number if successful.

Returns:
  0 if the string was read successfully, 0 otherwise.

void ACEXML_Parser::parse_version_info | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse VersionInfo declaration.

int ACEXML_Parser::parse_version_num | ( | ACEXML_Char *& | str | ) | `[protected]`

| Parse the version number in a VersionInfo declaration.

void ACEXML_Parser::parse_xml_decl | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse a XMLDecl declaration.

void ACEXML_Parser::parse_xml_prolog | ( | ACEXML_ENV_SINGLE_ARG_DECL |  | ) | `[protected]`

| Parse XML Prolog.

ACEXML_INLINE ACEXML_Char ACEXML_Parser::peek | ( | void |  | ) | `[protected, virtual]`

| Peek a character.

int ACEXML_Parser::pop_context | ( | int GE_ref | ACEXML_ENV_ARG_DECL | ) | `[private]`

| Pop the top element in the stack and replace current context with that.

void ACEXML_Parser::prefix_mapping | ( | const ACEXML_Char * | prefix,
|  | const ACEXML_Char * | uri,
|  | const ACEXML_Char * | name,
|  | int start | ACEXML_ENV_ARG_DECL
| ) | `[private]`

Dispatch prefix mapping calls to the ContentHandler.

Parameters:

  prefix | Namespace prefix
  uri | Namespace URI
  name | Local name
  start | 1 => startPrefixMapping 0 => endPrefixMapping

int ACEXML_Parser::push_context | ( | ACEXML_Parser_Context * | context | ) | `[private]`

| Push the current context on to the stack.

void ACEXML_Parser::reset | ( | void |  | ) | `[private]`

| Reset the parser state.

ACEXML_INLINE void ACEXML_Parser::setContentHandler | ( | ACEXML_ContentHandler * | handler | ) | `[virtual]`

| Allow an application to register a content event handler. Implements ACEXML_XMLReader.

ACEXML_INLINE void ACEXML_Parser::setDTDHandler | ( | ACEXML_DTDHandler * | handler | ) | `[virtual]`

| Allow an application to register a DTD event handler. Implements ACEXML_XMLReader.

ACEXML_INLINE void ACEXML_Parser::setEntityResolver | ( | ACEXML_EntityResolver * | resolver | ) | `[virtual]`

| Allow an application to register an entity resolver. Implements ACEXML_XMLReader.

ACEXML_INLINE void ACEXML_Parser::setErrorHandler | ( | ACEXML_ErrorHandler * | handler | ) | `[virtual]`

| Allow an application to register an error event handler. Implements ACEXML_XMLReader.

virtual void ACEXML_Parser::setFeature | ( | const ACEXML_Char * | name,
|  | int boolean_value | ACEXML_ENV_ARG_DECL
| ) | `[virtual]`

| Activating or deactivating a feature. Reimplemented from ACEXML_XMLReader.

virtual void ACEXML_Parser::setProperty | ( | const ACEXML_Char * | name,
|  | void *value | ACEXML_ENV_ARG_DECL
| ) | `[virtual]`

| Set the value of a property. Reimplemented from ACEXML_XMLReader.

ACEXML_INLINE int ACEXML_Parser::skip_equal | ( | void |  | ) | `[private]`

Skip an equal sign.

Return values:

  0 | when succeeds, -1 if no equal sign is found.

ACEXML_INLINE ACEXML_Char ACEXML_Parser::skip_whitespace | ( | void |  | ) | `[private]`

Skip any whitespaces encountered until the first non-whitespace character is encountered.

Returns:
  The next non-whitespace character from the CharStream.

See also:
  skip_whitespace_count

ACEXML_INLINE int ACEXML_Parser::skip_whitespace_count | ( | ACEXML_Char * | peek = 0 | ) | `[private]`

Skip any whitespaces encountered until the first non-whitespace character. The first non-whitespace character is not consumed. This method does peek into the input CharStream and therefore is more expensive than skip_whitespace.

Parameters:

  peek | If non-null, peek points to a ACEXML_Char where skip_whitespace_count stores the first non-whitespace character it sees (character is not removed from the stream.)

Returns:
  The number of whitespace characters consumed.

See also:
  skip_whitespace

int ACEXML_Parser::switch_input | ( | ACEXML_InputSource * | input,
|  | const ACEXML_Char * | systemId,
|  | const ACEXML_Char * | publicId = 0
| ) | `[private, virtual]`

| Create a new ACEXML_InputSource from systemId and publicId and replace the current input source with the newly created InputSource.

int ACEXML_Parser::switch_input | ( | ACEXML_CharStream * | cstream,
|  | const ACEXML_Char * | systemId,
|  | const ACEXML_Char * | publicId = 0
| ) | `[private, virtual]`

| Create a new ACEXML_CharStream from systemId and publicId and replace the current input stream with the newly created stream.

void ACEXML_Parser::warning | ( | const ACEXML_Char *msg | ACEXML_ENV_ARG_DECL | ) | `[private]`

| Dispatch warnings to ErrorHandler.

## Member Data Documentation

virtual void* ACEXML_Parser::ACEXML_SAXNotSupportedException

| Reimplemented from ACEXML_XMLReader.

virtual void ACEXML_Parser::ACEXML_SAXNotSupportedException

| Reimplemented from ACEXML_XMLReader.

void ACEXML_Parser::ACEXML_SAXNotSupportedException

| Reimplemented from ACEXML_XMLReader.

ACE_Obstack_T<ACEXML_Char> ACEXML_Parser::alt_stack_`[private]`

| Alternative obstack used to hold any strings when the original is in use.

ACEXML_ContentHandler* ACEXML_Parser::content_handler_`[private]`

ACE_Unbounded_Stack<ACEXML_Parser_Context*> ACEXML_Parser::ctx_stack_`[private]`

| Stack used to hold the Parser_Context.

ACEXML_Parser_Context* ACEXML_Parser::current_`[private]`

| Current parser context.

ACEXML_Char* ACEXML_Parser::doctype_`[private]`

| Document Type.

ACEXML_DTDHandler* ACEXML_Parser::dtd_handler_`[private]`

| Keeping track of the handlers. We do not manage the memory for handlers.

ACEXML_EntityResolver* ACEXML_Parser::entity_resolver_`[private]`

ACEXML_ErrorHandler* ACEXML_Parser::error_handler_`[private]`

int ACEXML_Parser::external_dtd_`[private]`

| If set, the document has an external DTD subset.

int ACEXML_Parser::external_entity_`[private]`

| T => We are parsing an external entity value.

ACEXML_Entity_Manager ACEXML_Parser::external_GE_`[private]`

| Set of external parsed general entities in the document.

ACEXML_Entity_Manager ACEXML_Parser::external_PE_`[private]`

| Set of external parsed parameter entities in the document.

int ACEXML_Parser::external_subset_`[private]`

| T => We are parsing an external subset.

ACE_Unbounded_Stack<ACEXML_Char*> ACEXML_Parser::GE_reference_`[private]`

| Set used to hold the general entity references that are active.

int ACEXML_Parser::has_pe_refs_`[private]`

| T => Internal DTD has parameter entity references.

int ACEXML_Parser::internal_dtd_`[private]`

| If set, the document has an internal DTD.

ACEXML_Entity_Manager ACEXML_Parser::internal_GE_`[private]`

| Set of internal parsed general entities in the document.

ACEXML_Entity_Manager ACEXML_Parser::internal_PE_`[private]`

| Set of internal parsed parameter entities in the document.

int ACEXML_Parser::namespace_prefixes_`[private]`

| If set, the parser should include namespace declarations in the list of attributes of an element.

int ACEXML_Parser::namespaces_`[private]`

| If set, the parser should allow access by namespace qualified names.

int ACEXML_Parser::nested_namespace_`[private]`

| T => We are processing a nested namespace.

ACEXML_Entity_Manager ACEXML_Parser::notations_`[private]`

| Set of notations declared in the document.

ACE_Obstack_T<ACEXML_Char> ACEXML_Parser::obstack_`[private]`

| Obstack used by the parser to hold all the strings parsed.

ACE_Unbounded_Stack<ACEXML_Char*> ACEXML_Parser::PE_reference_`[private]`

| Set used to hold the parameter entity references that are active.

ACEXML_Entity_Manager ACEXML_Parser::predef_entities_`[private]`

| Set of predefined entities used by the parser.

ACEXML_ParserInt::ReferenceState ACEXML_Parser::ref_state_`[private]`

| State of the parser when it encounters a reference.

int ACEXML_Parser::simple_parsing_`[private]`

| Feature flags If set, the parser should parse a document without a prolog

int ACEXML_Parser::standalone_`[private]`

| If set, the document is a standalone XML document.

ACEXML_Entity_Manager ACEXML_Parser::unparsed_entities_`[private]`

| Set of unparsed entities in the document.

int ACEXML_Parser::validate_`[private]`

| If set, the parser should also validate.

ACEXML_NamespaceSupport ACEXML_Parser::xml_namespace_`[private]`

| Namespace stack used by the parser to implement support for Namespaces.

The documentation for this class was generated from the following files:

- Parser.h
- Parser.cpp
- Parser.i