HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_XMLParser Class Referenceabstract

#include <UT_XMLParser.h>

+ Inheritance diagram for UT_XMLParser:

Public Member Functions

 UT_XMLParser ()
 Standard constructor. More...
 
virtual ~UT_XMLParser ()
 Standard destructor. More...
 
void setSubstituteEntities (bool substitute)
 
bool parseMemory (const char *contents, int size=-1)
 
bool parseFile (const char *filename)
 
const char * getError () const
 

Protected Member Functions

bool parseContext ()
 
virtual bool parseContextSubclass ()=0
 
xmlParserCtxtPtr getContext () const
 Return the current parsing context. More...
 
void setError (const char *error)
 Sets the error message for the current parsing run. More...
 

Detailed Description

Definition at line 25 of file UT_XMLParser.h.

Constructor & Destructor Documentation

UT_XMLParser::UT_XMLParser ( )

Standard constructor.

virtual UT_XMLParser::~UT_XMLParser ( )
virtual

Standard destructor.

Member Function Documentation

xmlParserCtxtPtr UT_XMLParser::getContext ( ) const
protected

Return the current parsing context.

const char* UT_XMLParser::getError ( ) const

Return the error message for the last parsing run. If no error was thrown in the last parse, then return an empty string.

bool UT_XMLParser::parseContext ( )
protected

Parse XML using the current context. Return true on a successful parse. Return false otherwise.

virtual bool UT_XMLParser::parseContextSubclass ( )
protectedpure virtual

Helper method for parseContext(). This must be overridden by the subclass.

Implemented in UT_XMLSaxParser, and UT_XMLDomParser.

bool UT_XMLParser::parseFile ( const char *  filename)

Parse XML in the given file. Return true on a successful parse. Return false otherwise.

bool UT_XMLParser::parseMemory ( const char *  contents,
int  size = -1 
)

Parse XML contents stored in memory. Return true on a successful parse. Return false otherwise.

void UT_XMLParser::setError ( const char *  error)
protected

Sets the error message for the current parsing run.

void UT_XMLParser::setSubstituteEntities ( bool  substitute)

Set whether the parser will automatically substitute entity references with the text of the entities' definitions. By default, the parser will not substitute entities so that you do not lose the entity reference information.


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