HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_XMLSaxParser Class Reference

#include <UT_XMLSaxParser.h>

+ Inheritance diagram for UT_XMLSaxParser:

Public Member Functions

 UT_XMLSaxParser ()
 Standard constructor. More...
 
 ~UT_XMLSaxParser () override
 Standard destructor. More...
 
- Public Member Functions inherited from UT_XMLParser
 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 Types

typedef std::pair< UT_String,
UT_String
UT_XMLAttribute
 An XML element attribute as defined by a name and a value. More...
 
typedef UT_Array
< UT_XMLAttribute * > 
UT_XMLAttributeList
 A list of XML element attributes. More...
 

Protected Member Functions

virtual void onStartDocument ()
 
virtual void onEndDocument ()
 
virtual void onStartElement (const UT_String &name, const UT_XMLAttributeList &attribs)
 
virtual void onEndElement (const UT_String &name)
 
virtual void onCharacters (const UT_String &characters)
 
virtual void onCDATABlock (const UT_String &characters)
 
virtual void onComment (const UT_String &text)
 
virtual void onWarning (const UT_String &text)
 
virtual void onError (const UT_String &text)
 
virtual void onFatalError (const UT_String &text)
 
bool parseContextSubclass () override
 
- Protected Member Functions inherited from UT_XMLParser
bool parseContext ()
 
xmlParserCtxtPtr getContext () const
 Return the current parsing context. More...
 
void setError (const char *error)
 Sets the error message for the current parsing run. More...
 

Static Protected Member Functions

static bool getAttribute (const UT_XMLAttributeList &attribs, const char *name, UT_String &value)
 Utility method for getting the value of an attribute. More...
 

Friends

class utSaxParserCallback
 

Detailed Description

Definition at line 29 of file UT_XMLSaxParser.h.

Member Typedef Documentation

typedef std::pair<UT_String, UT_String> UT_XMLSaxParser::UT_XMLAttribute
protected

An XML element attribute as defined by a name and a value.

Definition at line 41 of file UT_XMLSaxParser.h.

A list of XML element attributes.

Definition at line 44 of file UT_XMLSaxParser.h.

Constructor & Destructor Documentation

UT_XMLSaxParser::UT_XMLSaxParser ( )

Standard constructor.

UT_XMLSaxParser::~UT_XMLSaxParser ( )
override

Standard destructor.

Member Function Documentation

static bool UT_XMLSaxParser::getAttribute ( const UT_XMLAttributeList attribs,
const char *  name,
UT_String value 
)
staticprotected

Utility method for getting the value of an attribute.

virtual void UT_XMLSaxParser::onCDATABlock ( const UT_String characters)
protectedvirtual
virtual void UT_XMLSaxParser::onCharacters ( const UT_String characters)
protectedvirtual
virtual void UT_XMLSaxParser::onComment ( const UT_String text)
protectedvirtual
virtual void UT_XMLSaxParser::onEndDocument ( )
protectedvirtual
virtual void UT_XMLSaxParser::onEndElement ( const UT_String name)
protectedvirtual
virtual void UT_XMLSaxParser::onError ( const UT_String text)
protectedvirtual
virtual void UT_XMLSaxParser::onFatalError ( const UT_String text)
protectedvirtual
virtual void UT_XMLSaxParser::onStartDocument ( )
protectedvirtual

Callback methods that are called at various times of the parse.

virtual void UT_XMLSaxParser::onStartElement ( const UT_String name,
const UT_XMLAttributeList attribs 
)
protectedvirtual
virtual void UT_XMLSaxParser::onWarning ( const UT_String text)
protectedvirtual
bool UT_XMLSaxParser::parseContextSubclass ( )
overrideprotectedvirtual

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

Implements UT_XMLParser.

Friends And Related Function Documentation

friend class utSaxParserCallback
friend

We need to give the callback helper class access to the parser's callback functions (i.e. onStartElement).

Definition at line 74 of file UT_XMLSaxParser.h.


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