ACEXML
6.1.0
|
A SAX based parser. More...
#include <ACEXML/parser/parser/Parser.h>
Public Member Functions | |
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) |
virtual void | setFeature (const ACEXML_Char *name, int boolean_value) |
virtual void * | getProperty (const ACEXML_Char *name) |
virtual void | setProperty (const ACEXML_Char *name, void *value) |
virtual void | parse (ACEXML_InputSource *input) |
virtual void | parse (const ACEXML_Char *systemId) |
virtual void | setContentHandler (ACEXML_ContentHandler *handler) |
virtual void | setDTDHandler (ACEXML_DTDHandler *handler) |
virtual void | setEntityResolver (ACEXML_EntityResolver *resolver) |
virtual void | setErrorHandler (ACEXML_ErrorHandler *handler) |
Protected Member Functions | |
void | parse_xml_prolog (void) |
void | parse_version_info (void) |
void | parse_encoding_decl (void) |
void | parse_xml_decl (void) |
int | parse_text_decl (void) |
int | parse_processing_instruction (void) |
int | parse_doctypedecl (void) |
void | parse_element (int is_root) |
int | parse_content (const ACEXML_Char *startname, const ACEXML_Char *&ns_uri, const ACEXML_Char *&ns_lname, int ns_flag) |
int | parse_char_reference (ACEXML_Char *buf, size_t &len) |
ACEXML_Char * | parse_reference_name (void) |
int | parse_cdata (void) |
int | parse_internal_dtd (void) |
int | parse_comment (void) |
int | parse_element_decl (void) |
int | parse_entity_decl (void) |
int | parse_attlist_decl (void) |
int | parse_atttype (void) |
int | parse_notation_decl (void) |
int | parse_external_id (ACEXML_Char *&publicId, ACEXML_Char *&systemId) |
int | parse_external_dtd (void) |
int | parse_external_subset (void) |
int | parse_markup_decl (void) |
int | parse_conditional_section (void) |
int | parse_includesect (void) |
int | parse_ignoresect (void) |
int | parse_PE_reference (void) |
int | parse_entity_reference (void) |
int | parse_entity_value (ACEXML_Char *&str) |
int | parse_defaultdecl (void) |
int | parse_children_definition (void) |
int | parse_child (int skip_open_paren) |
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 (void) |
int | parse_attvalue (ACEXML_Char *&str) |
int | parse_tokenized_type (void) |
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 Member Functions | |
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) |
void | warning (const ACEXML_Char *msg) |
void | fatal_error (const ACEXML_Char *msg) |
void | prefix_mapping (const ACEXML_Char *prefix, const ACEXML_Char *uri, int start) |
int | parse_token (const ACEXML_Char *keyword) |
int | push_context (ACEXML_Parser_Context *context) |
size_t | pop_context (int GE_ref) |
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 (void) |
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 | |
static const ACEXML_Char | simple_parsing_feature_ [] = ACE_TEXT ("Simple") |
static const ACEXML_Char | namespaces_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/namespaces") |
static const ACEXML_Char | namespace_prefixes_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/namespace-prefixes") |
static const ACEXML_Char | validation_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/validation") |
A SAX based parser.
ACEXML_Parser::ACEXML_Parser | ( | void | ) |
Default constructor.
ACEXML_Parser::~ACEXML_Parser | ( | void | ) | [virtual] |
Destructor.
int ACEXML_Parser::check_for_PE_reference | ( | void | ) | [private] |
Check for a parameter entity reference. This is used to check for the occurrence of a PE Reference withing markupDecl. Additionally this function consumes any leading or trailing whitespace around the PE Reference.
Number | of whitespace characters skipped. |
void ACEXML_Parser::error | ( | const ACEXML_Char * | msg | ) | [private] |
Dispatch errors to ErrorHandler.
void ACEXML_Parser::fatal_error | ( | const ACEXML_Char * | msg | ) | [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.)
str | returns the un-quoted string. |
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 | ) | [virtual] |
Look up the value of a feature. This method allows programmers to check whether a specific feature has been activated in the parser.
Implements ACEXML_XMLReader.
void * ACEXML_Parser::getProperty | ( | const ACEXML_Char * | name | ) | [virtual] |
Look up the value of a property.
Implements ACEXML_XMLReader.
int ACEXML_Parser::initialize | ( | ACEXML_InputSource * | input | ) |
Initialize the parser state.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 | ( | ACEXML_InputSource * | input | ) | [virtual] |
Parse an XML document.
Implements ACEXML_XMLReader.
void ACEXML_Parser::parse | ( | const ACEXML_Char * | systemId | ) | [virtual] |
Parse an XML document from a system identifier (URI).
Implements ACEXML_XMLReader.
int ACEXML_Parser::parse_attlist_decl | ( | void | ) | [protected] |
Parse an "ATTLIST" decl. Thse first character this method expects is always the 'A' (the first char) in the word "ATTLIST".
0 | on success, -1 otherwise. |
ACEXML_Char * ACEXML_Parser::parse_attname | ( | void | ) | [protected] |
Parse an attribute name.
str | String containing the value of the attribute name if successful. |
0 | otherwise. |
int ACEXML_Parser::parse_atttype | ( | void | ) | [protected] |
Parse a AttType declaration.
AttType ::= StringType | TokenizedType | EnumeratedType StringType ::= 'CDATA' TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default] | 'IDREF' [VC: IDREF] | 'IDREFS' [VC: IDREF] | 'ENTITY' [VC: Entity Name] | 'ENTITIES' [VC: Entity Name] | 'NMTOKEN' [VC: Name Token] | 'NMTOKENS'
EnumeratedType ::= NotationType | Enumeration NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [VC: Notation Attributes] [VC: One Notation Per Element Type] [VC: No Notation on Empty Element] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration]
int ACEXML_Parser::parse_attvalue | ( | ACEXML_Char *& | str | ) | [protected] |
Parse an attribute value.
str | String containing the value of the attribute if successful. |
int ACEXML_Parser::parse_cdata | ( | void | ) | [protected] |
Parse a CDATA section. The first character should always be the first '[' in CDATA definition.
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., " " or "". The first character encountered should be the '#' char.
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. |
0 | on success and -1 otherwise. |
int ACEXML_Parser::parse_child | ( | int | skip_open_paren | ) | [protected] |
Parse a cp
non-terminal. cp
can either be a seq
or a choice
. This function calls itself recursively.
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. |
0 | on success, -1 otherwise. |
int ACEXML_Parser::parse_children_definition | ( | void | ) | [protected] |
Parse the "children" and "Mixed" non-terminals in contentspec.
The first character this function sees must be the first open paren '(' in children.
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 | ( | void | ) | [protected] |
Parse a conditionalSect declaration.
int ACEXML_Parser::parse_content | ( | const ACEXML_Char * | startname, |
const ACEXML_Char *& | ns_uri, | ||
const ACEXML_Char *& | ns_lname, | ||
int | ns_flag | ||
) | [protected] |
Parse a content declaration.
int ACEXML_Parser::parse_defaultdecl | ( | void | ) | [protected] |
Parse a DefaultDecl specification.
int ACEXML_Parser::parse_doctypedecl | ( | void | ) | [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 | ) | [protected] |
Parse an XML element. The first character encountered should be the first character of the element "Name".
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_. |
int ACEXML_Parser::parse_element_decl | ( | void | ) | [protected] |
Parse an "ELEMENT" decl. The first character this method expects is always the 'L' (the second char) in the word "ELEMENT".
0 | on success, -1 otherwise. |
int ACEXML_Parser::parse_encname | ( | ACEXML_Char *& | str | ) | [protected] |
Parse the encoding name in an XML Prolog section.
str | String containing the encoding name if successful. |
void ACEXML_Parser::parse_encoding_decl | ( | void | ) | [protected] |
Parse a EncodingDecl declaration.
int ACEXML_Parser::parse_entity_decl | ( | void | ) | [protected] |
Parse an "ENTITY" decl. The first character this method expects is always the 'N' (the second char) in the word "ENTITY".
0 | on success, -1 otherwise. |
int ACEXML_Parser::parse_entity_reference | ( | void | ) | [protected] |
Parse a Reference.
int ACEXML_Parser::parse_entity_value | ( | ACEXML_Char *& | str | ) | [protected] |
Parse an entityValue.
int ACEXML_Parser::parse_external_dtd | ( | void | ) | [protected] |
Parse an external DTD.
int ACEXML_Parser::parse_external_id | ( | ACEXML_Char *& | publicId, |
ACEXML_Char *& | systemId | ||
) | [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.
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. |
0 | on success, -1 otherwise. |
int ACEXML_Parser::parse_external_subset | ( | void | ) | [protected] |
Parse an external subset. This does the actual parsing of an external subset and is called by
int ACEXML_Parser::parse_ignoresect | ( | void | ) | [protected] |
Parse a ignoreSect declaration.
int ACEXML_Parser::parse_includesect | ( | void | ) | [protected] |
Parse a includeSect declaration.
int ACEXML_Parser::parse_internal_dtd | ( | void | ) | [protected] |
Parse a "markupdecl" section, this includes both "markupdecl" and "DeclSep" sections in XML specification
int ACEXML_Parser::parse_markup_decl | ( | void | ) | [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.
ACEXML_Char * ACEXML_Parser::parse_nmtoken | ( | ACEXML_Char | ch = 0 | ) | [protected] |
Parse a NMTOKEN from the input stream.
int ACEXML_Parser::parse_notation_decl | ( | void | ) | [protected] |
Parse a "NOTATION" decl. The first character this method expects is always the 'N' (the first char) in the word "NOTATION".
0 | on success, -1 otherwise. |
int ACEXML_Parser::parse_PE_reference | ( | void | ) | [protected] |
Parse a PEReference.
int ACEXML_Parser::parse_processing_instruction | ( | void | ) | [protected] |
Parse a PI statement. The first character encountered should always be '?' in the PI prefix "@<?".
0 | on success, -1 otherwise. |
int ACEXML_Parser::parse_pubid_literal | ( | ACEXML_Char *& | str | ) | [protected] |
Parse a PubidLiteral.
str | String containing the PubidLiteral if successful. |
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
A | pointer to name of reference, 0 otherwise. |
int ACEXML_Parser::parse_sddecl | ( | ACEXML_Char *& | str | ) | [protected] |
Parse a SDDecl string.
str | String containing the encoding name if successful. |
int ACEXML_Parser::parse_system_literal | ( | ACEXML_Char *& | str | ) | [protected] |
Parse a SystemLiteral.
str | String containing the SystemLiteral if successful. |
int ACEXML_Parser::parse_text_decl | ( | void | ) | [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 | ( | void | ) | [protected] |
Parse a tokenized type attribute.
int ACEXML_Parser::parse_version | ( | ACEXML_Char *& | str | ) | [protected] |
Parse the version string in an XML Prolog section.
str | String containing the version number if successful. |
void ACEXML_Parser::parse_version_info | ( | void | ) | [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 | ( | void | ) | [protected] |
Parse a XMLDecl declaration.
void ACEXML_Parser::parse_xml_prolog | ( | void | ) | [protected] |
Parse XML Prolog.
ACEXML_INLINE ACEXML_Char ACEXML_Parser::peek | ( | void | ) | [protected, virtual] |
Peek a character.
size_t ACEXML_Parser::pop_context | ( | int | GE_ref | ) | [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, | ||
int | start | ||
) | [private] |
Dispatch prefix mapping calls to the ContentHandler.
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.
void ACEXML_Parser::setFeature | ( | const ACEXML_Char * | name, |
int | boolean_value | ||
) | [virtual] |
Activating or deactivating a feature.
Implements ACEXML_XMLReader.
void ACEXML_Parser::setProperty | ( | const ACEXML_Char * | name, |
void * | value | ||
) | [virtual] |
Set the value of a property.
Implements ACEXML_XMLReader.
ACEXML_INLINE int ACEXML_Parser::skip_equal | ( | void | ) | [private] |
Skip an equal sign.
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.
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.
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.) |
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.
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.
void ACEXML_Parser::warning | ( | const ACEXML_Char * | msg | ) | [private] |
Dispatch warnings to ErrorHandler.
ACE_Obstack_T<ACEXML_Char> ACEXML_Parser::alt_stack_ [private] |
Alternative obstack used to hold any strings when the original is in use.
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_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.
Set of external parsed general entities in the document.
Set of external parsed parameter entities in the document.
int ACEXML_Parser::external_subset_ [private] |
T => We are parsing an external subset.
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.
Set of internal parsed general entities in the document.
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.
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.
Set used to hold the parameter entity references that are active.
Set of predefined entities used by the parser.
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.
Set of unparsed entities in the document.
int ACEXML_Parser::validate_ [private] |
If set, the parser should also validate.
Namespace stack used by the parser to implement support for Namespaces.