Poco::XML

class SAXParser

Library: XML
Package: SAX
Header: Poco/SAX/SAXParser.h

Description

This class provides a SAX2 (Simple API for XML) interface to expat, the XML parser toolkit. The following SAX2 features and properties are supported:

Inheritance

Direct Base Classes: XMLReader

All Base Classes: XMLReader

Member Summary

Member Functions: addEncoding, getContentHandler, getDTDHandler, getEncoding, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parseMemoryNP, parseString, setContentHandler, setDTDHandler, setEncoding, setEntityResolver, setErrorHandler, setFeature, setProperty, setupParse

Inherited Functions: getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parseMemoryNP, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty

Constructors

SAXParser

SAXParser();

Creates an SAXParser.

SAXParser

SAXParser(
    const XMLString & encoding
);

Creates an SAXParser with the given encoding.

Destructor

~SAXParser virtual

~SAXParser();

Destroys the SAXParser.

Member Functions

addEncoding

void addEncoding(
    const XMLString & name,
    Poco::TextEncoding * pEncoding
);

Adds an encoding to the parser. Does not take ownership of the pointer! XMLReader

getContentHandler virtual

ContentHandler * getContentHandler() const;

See also: Poco::XML::XMLReader::getContentHandler()

getDTDHandler virtual

DTDHandler * getDTDHandler() const;

See also: Poco::XML::XMLReader::getDTDHandler()

getEncoding

const XMLString & getEncoding() const;

Returns the name of the encoding used by the parser if no encoding is specified in the XML document.

getEntityResolver virtual

EntityResolver * getEntityResolver() const;

See also: Poco::XML::XMLReader::getEntityResolver()

getErrorHandler virtual

ErrorHandler * getErrorHandler() const;

See also: Poco::XML::XMLReader::getErrorHandler()

getFeature virtual

bool getFeature(
    const XMLString & featureId
) const;

See also: Poco::XML::XMLReader::getFeature()

getProperty virtual

void * getProperty(
    const XMLString & propertyId
) const;

See also: Poco::XML::XMLReader::getProperty()

parse virtual

void parse(
    InputSource * pSource
);

See also: Poco::XML::XMLReader::parse()

parse virtual

void parse(
    const XMLString & systemId
);

See also: Poco::XML::XMLReader::parse()

parseMemoryNP virtual

void parseMemoryNP(
    const char * xml,
    std::size_t size
);

Extensions

See also: Poco::XML::XMLReader::parseMemoryNP()

parseString

void parseString(
    const std::string & xml
);

setContentHandler virtual

void setContentHandler(
    ContentHandler * pContentHandler
);

See also: Poco::XML::XMLReader::setContentHandler()

setDTDHandler virtual

void setDTDHandler(
    DTDHandler * pDTDHandler
);

See also: Poco::XML::XMLReader::setDTDHandler()

setEncoding

void setEncoding(
    const XMLString & encoding
);

Sets the encoding used by the parser if no encoding is specified in the XML document.

setEntityResolver virtual

void setEntityResolver(
    EntityResolver * pResolver
);

See also: Poco::XML::XMLReader::setEntityResolver()

setErrorHandler virtual

void setErrorHandler(
    ErrorHandler * pErrorHandler
);

See also: Poco::XML::XMLReader::setErrorHandler()

setFeature virtual

void setFeature(
    const XMLString & featureId,
    bool state
);

See also: Poco::XML::XMLReader::setFeature()

setProperty virtual

void setProperty(
    const XMLString & propertyId,
    const XMLString & value
);

See also: Poco::XML::XMLReader::setProperty()

setProperty virtual

void setProperty(
    const XMLString & propertyId,
    void * value
);

See also: Poco::XML::XMLReader::setProperty()

setupParse protected

void setupParse();