ulxr::XmlParser Class Reference
[Low-level parser classes]

Base class for XML parsing with expat. More...

#include <ulxr_xmlparse.h>

Inheritance diagram for ulxr::XmlParser:

Inheritance graph
[legend]
Collaboration diagram for ulxr::XmlParser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 XmlParser ()
 Constructs a parser.

Protected Member Functions

void assertEndElement (const char *current, const char *expected)
 Checks if current and expected tag are the same.
bool testStartElement (const XML_Char *name, const XML_Char **atts)
 Tests if the current opening tag is to be parsed by this inheritance level or by the parent.
bool testEndElement (const XML_Char *name)
 Tests if the current closing tag is to be parsed by this inheritance level or by the parent.

Private Member Functions

virtual void charData (const XML_Char *s, int len)
 Parses the content of the current xml element.

Detailed Description

Base class for XML parsing with expat.

Definition at line 43 of file ulxr_xmlparse.h.


Constructor & Destructor Documentation

ulxr::XmlParser::XmlParser (  ) 

Constructs a parser.

Definition at line 40 of file ulxr_xmlparse.cpp.


Member Function Documentation

void ulxr::XmlParser::assertEndElement ( const char *  current,
const char *  expected 
) [protected]

Checks if current and expected tag are the same.

Parameters:
current the name of the current tag
expected name of the expected tag

Definition at line 78 of file ulxr_xmlparse.cpp.

References ulxr::NotWellformedError, ULXR_GET_STRING, ulxr_i18n, ULXR_PCHAR, and ULXR_TRACE.

bool ulxr::XmlParser::testStartElement ( const XML_Char *  name,
const XML_Char **  atts 
) [protected]

Tests if the current opening tag is to be parsed by this inheritance level or by the parent.

Used ONLY internally.

Parameters:
name the name of the current tag
atts pointer to the current attributes (unused in XML-RPC)
Returns:
true: element has been handled

Reimplemented in ulxr::MethodCallParser, ulxr::MethodResponseParser, and ulxr::ValueParser.

Definition at line 60 of file ulxr_xmlparse.cpp.

References ulxr::NotWellformedError, ULXR_GET_STRING, ulxr_i18n, and ULXR_PCHAR.

Referenced by ulxr::ValueParser::startElement().

bool ulxr::XmlParser::testEndElement ( const XML_Char *  name  )  [protected]

Tests if the current closing tag is to be parsed by this inheritance level or by the parent.

Used ONLY internally.

Parameters:
name the name of the current tag
Returns:
true: element has been handled

Reimplemented in ulxr::MethodCallParser, ulxr::MethodResponseParser, and ulxr::ValueParser.

Definition at line 69 of file ulxr_xmlparse.cpp.

References ulxr::NotWellformedError, ULXR_GET_STRING, ulxr_i18n, and ULXR_PCHAR.

Referenced by ulxr::ValueParser::endElement().

void ulxr::XmlParser::charData ( const XML_Char *  s,
int  len 
) [private, virtual]

Parses the content of the current xml element.

Used ONLY internally as callback from expat. The text from expat is encoded in UTF8.

Parameters:
s the current chunk of text
len valid len.

Reimplemented from ulxr::ExpatWrapper.

Definition at line 46 of file ulxr_xmlparse.cpp.

References ULXR_PCHAR, and ULXR_TRACE.


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 20:09:14 2007 for ulxmlrpcpp by  doxygen 1.5.1