Poco::XML

class XMLFilterImpl

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

Description

Base class for deriving an XML filter.

This class is designed to sit between an XMLReader and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through.

Inheritance

Direct Base Classes: XMLFilter, EntityResolver, DTDHandler, ContentHandler, ErrorHandler

All Base Classes: ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader

Known Derived Classes: WhitespaceFilter

Member Summary

Member Functions: characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parent, parse, parseMemoryNP, processingInstruction, releaseInputSource, resolveEntity, setContentHandler, setDTDHandler, setDocumentLocator, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, setupParse, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning

Inherited Functions: characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parseMemoryNP, processingInstruction, releaseInputSource, resolveEntity, setContentHandler, setDTDHandler, setDocumentLocator, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning

Constructors

XMLFilterImpl

XMLFilterImpl();

Construct an empty XML filter, with no parent.

This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty, unless you use this as a pure event consumer rather than as an XMLReader.

XMLFilterImpl

XMLFilterImpl(
    XMLReader * pParent
);

Construct an XML filter with the specified parent.

Destructor

~XMLFilterImpl virtual

~XMLFilterImpl();

Destroys the XMLFilterImpl.

Member Functions

characters virtual

void characters(
    const XMLChar ch[],
    int start,
    int length
);

endDocument virtual

void endDocument();

endElement virtual

void endElement(
    const XMLString & uri,
    const XMLString & localName,
    const XMLString & qname
);

endPrefixMapping virtual

void endPrefixMapping(
    const XMLString & prefix
);

error virtual

void error(
    const SAXException & e
);

fatalError virtual

void fatalError(
    const SAXException & e
);

getContentHandler virtual

ContentHandler * getContentHandler() const;

getDTDHandler virtual

DTDHandler * getDTDHandler() const;

getEntityResolver virtual

EntityResolver * getEntityResolver() const;

getErrorHandler virtual

ErrorHandler * getErrorHandler() const;

getFeature virtual

bool getFeature(
    const XMLString & featureId
) const;

getParent virtual

XMLReader * getParent() const;

getProperty virtual

void * getProperty(
    const XMLString & propertyId
) const;

ignorableWhitespace virtual

void ignorableWhitespace(
    const XMLChar ch[],
    int start,
    int length
);

notationDecl virtual

void notationDecl(
    const XMLString & name,
    const XMLString * publicId,
    const XMLString * systemId
);

parse virtual

void parse(
    InputSource * pSource
);

parse virtual

void parse(
    const XMLString & systemId
);

parseMemoryNP virtual

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

processingInstruction virtual

void processingInstruction(
    const XMLString & target,
    const XMLString & data
);

releaseInputSource virtual

void releaseInputSource(
    InputSource * pSource
);

resolveEntity virtual

InputSource * resolveEntity(
    const XMLString * publicId,
    const XMLString & systemId
);

setContentHandler virtual

void setContentHandler(
    ContentHandler * pContentHandler
);

setDTDHandler virtual

void setDTDHandler(
    DTDHandler * pDTDHandler
);

setDocumentLocator virtual

void setDocumentLocator(
    const Locator * loc
);

setEntityResolver virtual

void setEntityResolver(
    EntityResolver * pResolver
);

setErrorHandler virtual

void setErrorHandler(
    ErrorHandler * pErrorHandler
);

setFeature virtual

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

setParent virtual

void setParent(
    XMLReader * pParent
);

setProperty virtual

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

setProperty virtual

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

skippedEntity virtual

void skippedEntity(
    const XMLString & prefix
);

startDocument virtual

void startDocument();

startElement virtual

void startElement(
    const XMLString & uri,
    const XMLString & localName,
    const XMLString & qname,
    const Attributes & attrList
);

startPrefixMapping virtual

void startPrefixMapping(
    const XMLString & prefix,
    const XMLString & uri
);

unparsedEntityDecl virtual

void unparsedEntityDecl(
    const XMLString & name,
    const XMLString * publicId,
    const XMLString & systemId,
    const XMLString & notationName
);

warning virtual

void warning(
    const SAXException & e
);

parent protected inline

XMLReader * parent() const;

Return a pointer to the parent reader. Subclasses can use this method instead of getParent() for better performance - this method is non-virtual and implemented as inline.

setupParse protected virtual

virtual void setupParse();

Setup the event handlers in the parent reader.