Poco::XML

class DOMBuilder

File Information

Library: XML
Package: DOM
Header: Poco/DOM/DOMBuilder.h

Description

This class builds a tree representation of an XML document, according to the W3C Document Object Model, Level 1 and 2 specifications.

The actual XML parsing is done by an XMLReader, which must be supplied to the DOMBuilder.

Inheritance

Direct Base Classes: DTDHandler, ContentHandler, LexicalHandler

All Base Classes: ContentHandler, DTDHandler, LexicalHandler

Member Summary

Member Functions: appendNode, characters, comment, endCDATA, endDTD, endDocument, endElement, endEntity, endPrefixMapping, ignorableWhitespace, notationDecl, parse, parseMemoryNP, processingInstruction, setDocumentLocator, setupParse, skippedEntity, startCDATA, startDTD, startDocument, startElement, startEntity, startPrefixMapping, unparsedEntityDecl

Inherited Functions: characters, comment, endCDATA, endDTD, endDocument, endElement, endEntity, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startDocument, startElement, startEntity, startPrefixMapping, unparsedEntityDecl

Constructors

DOMBuilder

DOMBuilder(
    XMLReader & xmlReader,
    NamePool * pNamePool = 0
);

Creates a DOMBuilder using the given XMLReader. If a NamePool is given, it becomes the Document's NamePool.

Destructor

~DOMBuilder virtual

virtual ~DOMBuilder();

Destroys the DOMBuilder.

Member Functions

parse virtual

virtual Document * parse(
    const XMLString & uri
);

Parse an XML document from a location identified by an URI.

parse virtual

virtual Document * parse(
    InputSource * pInputSource
);

Parse an XML document from a location identified by an InputSource.

parseMemoryNP virtual

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

Parses an XML document from memory.

appendNode protected

void appendNode(
    AbstractNode * pNode
);

characters protected virtual

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

comment protected virtual

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

endCDATA protected virtual

void endCDATA();

endDTD protected virtual

void endDTD();

endDocument protected virtual

void endDocument();

endElement protected virtual

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

endEntity protected virtual

void endEntity(
    const XMLString & name
);

endPrefixMapping protected virtual

void endPrefixMapping(
    const XMLString & prefix
);

ignorableWhitespace protected virtual

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

notationDecl protected virtual

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

processingInstruction protected virtual

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

setDocumentLocator protected virtual

void setDocumentLocator(
    const Locator * loc
);

setupParse protected

void setupParse();

skippedEntity protected virtual

void skippedEntity(
    const XMLString & name
);

startCDATA protected virtual

void startCDATA();

startDTD protected virtual

void startDTD(
    const XMLString & name,
    const XMLString & publicId,
    const XMLString & systemId
);

startDocument protected virtual

void startDocument();

startElement protected virtual

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

startEntity protected virtual

void startEntity(
    const XMLString & name
);

startPrefixMapping protected virtual

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

unparsedEntityDecl protected virtual

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