Main Page Modules Class Hierarchy Compound List File List Compound Members

# NEDSAXHandler Class Reference

`#include <nedsaxhandler.h>`

Inheritance diagram for NEDSAXHandler::

List of all members.

## Public Methods

| NEDSAXHandler (const char *filename)
virtual | ~NEDSAXHandler ()
virtual NEDElement* | getTree ()
SAX event handlers
virtual void | startElement (const char *name, const char **atts)
virtual void | endElement (const char *name)
virtual void | characterData (const char *s, int len)
virtual void | processingInstruction (const char *target, const char *data)
virtual void | comment (const char *data)
virtual void | startCdataSection ()
virtual void | endCdataSection ()

## Detailed Description

SAX handler (to be used with SAXParser) that builds a NED object tree. Elements of the tree are subclassed from NEDElement; NEDElementFactory is used to actually create the objects.

Usage:

        NEDSAXHandler nedsaxhandler(filename);
        SAXParser parser;

        parser.setHandler(&nedsaxhandler);
        parser.parse(f);

        NEDElement *result = nedsaxhandler.getTree();

## Constructor & Destructor Documentation

NEDSAXHandler::NEDSAXHandler ( | const char * filename )

| Constructor. Filename is necessary to create correct src-loc info.

NEDSAXHandler::~NEDSAXHandler ( | )`[virtual]`

| Destructor

## Member Function Documentation

void NEDSAXHandler::characterData ( | const char * s,
| int len )`[virtual]`

| Called by the parser on SAX CharacterData events. Reimplemented from SAXHandler.

void NEDSAXHandler::comment ( | const char * data )`[virtual]`

| Called by the parser on SAX Comment events. Reimplemented from SAXHandler.

void NEDSAXHandler::endCdataSection ( | )`[virtual]`

| Called by the parser on SAX CDataEnd events. Reimplemented from SAXHandler.

void NEDSAXHandler::endElement ( | const char * name )`[virtual]`

| Called by the parser on SAX EndElement events. Reimplemented from SAXHandler.

NEDElement * NEDSAXHandler::getTree ( | )`[virtual]`

| Returns the object tree that was built up during XML parsing.

void NEDSAXHandler::processingInstruction ( | const char * target,
| const char * data )`[virtual]`

| Called by the parser on SAX ProcessingInstruction events. Reimplemented from SAXHandler.

void NEDSAXHandler::startCdataSection ( | )`[virtual]`

| Called by the parser on SAX CDataStart events. Reimplemented from SAXHandler.

void NEDSAXHandler::startElement ( | const char * name,
| const char ** atts )`[virtual]`

| Called by the parser on SAX StartElement events. Reimplemented from SAXHandler.

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

- nedsaxhandler.h