Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

regina::xml::XMLParserCallback Class Reference
[General Utility Classes]

Provides the callbacks for an XMLParser. More...

#include <xmlutils.h>

Inheritance diagram for regina::xml::XMLParserCallback:

regina::NXMLCallback List of all members.

Public Member Functions

virtual void start_document ()
 Called at the start of the document.
virtual void end_document ()
 Called when the document is finalised.
virtual void start_element (const std::string &n, const regina::xml::XMLPropertyDict &p)
 Called when an element's opening tag is encountered.
virtual void end_element (const std::string &n)
 Called when an element's closing tag is encountered.
virtual void characters (const std::string &s)
 Called when characters are encountered.
virtual void comment (const std::string &s)
 Called when a comment is encountered.
virtual void warning (const std::string &s)
 Called when a parser warning occurs.
virtual void error (const std::string &s)
 Called when a parser error occurs.
virtual void fatal_error (const std::string &s)
 Called when a parser fatal error occurs.

Detailed Description

Provides the callbacks for an XMLParser.

The various routines in this class will be called when corresponding elements of the XML file being parsed are encountered.

The routines in this class do nothing; you will need to create a derived class that overrides some or all of these routines to do the processing that you require.

Python:
Not present.
Author:
This class was taken and modified from the libxml++ library (http://lusis.org/~ari/xml++/).


Member Function Documentation

void regina::xml::XMLParserCallback::characters const std::string &  s  )  [inline, virtual]
 

Called when characters are encountered.

Parameters:
s the characters encountered.

Reimplemented in regina::NXMLCallback.

void regina::xml::XMLParserCallback::comment const std::string &  s  )  [inline, virtual]
 

Called when a comment is encountered.

Parameters:
s the comment string.

void regina::xml::XMLParserCallback::end_document  )  [inline, virtual]
 

Called when the document is finalised.

Reimplemented in regina::NXMLCallback.

void regina::xml::XMLParserCallback::end_element const std::string &  n  )  [inline, virtual]
 

Called when an element's closing tag is encountered.

This is called immediately after start_element() if the opening tag is in <tag/> format.

Parameters:
n the name of the tag.

Reimplemented in regina::NXMLCallback.

void regina::xml::XMLParserCallback::error const std::string &  s  )  [inline, virtual]
 

Called when a parser error occurs.

Parameters:
s the error message.

Reimplemented in regina::NXMLCallback.

void regina::xml::XMLParserCallback::fatal_error const std::string &  s  )  [inline, virtual]
 

Called when a parser fatal error occurs.

Parameters:
s the error message.

Reimplemented in regina::NXMLCallback.

void regina::xml::XMLParserCallback::start_document  )  [inline, virtual]
 

Called at the start of the document.

void regina::xml::XMLParserCallback::start_element const std::string &  n,
const regina::xml::XMLPropertyDict p
[inline, virtual]
 

Called when an element's opening tag is encountered.

Parameters:
n the name of the tag.
p a hashed dictionary of all the properties of the tag.

Reimplemented in regina::NXMLCallback.

void regina::xml::XMLParserCallback::warning const std::string &  s  )  [inline, virtual]
 

Called when a parser warning occurs.

Parameters:
s the warning message.

Reimplemented in regina::NXMLCallback.


The documentation for this class was generated from the following file:
Copyright © 1999-2004, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).