sax Class Reference

Inherited by csvsax, inisax, jsonsax, propsax, and xmlsax.

## Public Member Functions

| sax ()
virtual | ~sax ()
virtual bool | parseFile (const char *filename)
virtual bool | parseString (const char *string)
const char * | getError ()

## Detailed Description

The sax class is a base class for a SAX-style parser. To use this class, you should create a class that inherits from one if its immediate children and implements the protected virtual methods of that class.

## Constructor & Destructor Documentation

## sax()

sax::sax | ( |  | ) |

Creates an instance of the sax class.

## ~sax()

virtual sax::~sax | ( |  | ) |

virtual

Deletes this instance of the sax class.

## Member Function Documentation

## getError()

const char* sax::getError | ( |  | ) |

If parseFile() or parseString() fails, this method returns the error that caused the failure.

## parseFile()

virtual bool sax::parseFile | ( | const char * | filename | ) |

virtual

Parses file "filename" and calls the appropriate callback when tags, attributes, text, etc. are encountered.

Returns true on success or false otherwise.

Reimplemented in xmldom, propdom, jsondom, inidom, and csvdom.

## parseString()

virtual bool sax::parseString | ( | const char * | string | ) |

virtual

Parses "string" and calls the appropriate callback when tags, attributes, text, etc. are encountered.

Returns true on success or false otherwise.

Reimplemented in xmldom, propdom, jsondom, inidom, and csvdom.