Class Poco::XML::DOMSerializer
Author: Applied Informatics Software Engineering GmbH and Contributors
Date: 2009-11-24

# Poco::XML

# class DOMSerializer

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

## Description

The DOMSerializer serializes a DOM document into a sequence of SAX events which are reported to the registered SAX event handlers.

The DOMWriter uses a DOMSerializer with an XMLWriter to serialize a DOM document into textual XML.

## Inheritance

Direct Base Classes: XMLReader

All Base Classes: XMLReader

## Member Summary

Member Functions: getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, handleCDATASection, handleCharacterData, handleComment, handleDocument, handleDocumentType, handleElement, handleEntity, handleFragment, handleNode, handleNotation, handlePI, iterate, parse, parseMemoryNP, serialize, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty

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

## Constructors

### DOMSerializer

DOMSerializer();

Creates the DOMSerializer.

## Destructor

### ~DOMSerializer

~DOMSerializer();

Destroys the DOMSerializer.

## Member Functions

### getContentHandler

ContentHandler * getContentHandler() const;

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

### getDTDHandler

DTDHandler * getDTDHandler() const;

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

### getEntityResolver

EntityResolver * getEntityResolver() const;

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

### getErrorHandler

ErrorHandler * getErrorHandler() const;

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

### getFeature

bool getFeature(
const XMLString & featureId
) const;

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

### getProperty

void * getProperty(
const XMLString & propertyId
) const;

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

### serialize

void serialize(
const Node * pNode
);

Serializes a DOM node and its children into a sequence of SAX events, which are reported to the registered SAX event handlers.

### setContentHandler

void setContentHandler(
ContentHandler * pContentHandler
);

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

### setDTDHandler

void setDTDHandler(
DTDHandler * pDTDHandler
);

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

### setEntityResolver

void setEntityResolver(
EntityResolver * pResolver
);

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

### setErrorHandler

void setErrorHandler(
ErrorHandler * pErrorHandler
);

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

### setFeature

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

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

### setProperty

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

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

### setProperty

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

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

### handleCDATASection

void handleCDATASection(
const CDATASection * pCDATA
) const;

### handleCharacterData

void handleCharacterData(
const Text * pText
) const;

### handleComment

void handleComment(
const Comment * pComment
) const;

### handleDocument

void handleDocument(
const Document * pDocument
) const;

### handleDocumentType

void handleDocumentType(
const DocumentType * pDocumentType
) const;

### handleElement

void handleElement(
const Element * pElement
) const;

### handleEntity

void handleEntity(
const Entity * pEntity
) const;

### handleFragment

void handleFragment(
const DocumentFragment * pFragment
) const;

### handleNode

void handleNode(
const Node * pNode
) const;

### handleNotation

void handleNotation(
const Notation * pNotation
) const;

### handlePI

void handlePI(
const ProcessingInstruction * pPI
) const;

### iterate

void iterate(
const Node * pNode
) const;

### parse

void parse(
InputSource * pSource
);

The DOMSerializer cannot parse an InputSource, so this method simply throws an XMLException when invoked.

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

### parse

void parse(
const XMLString & systemId
);

The DOMSerializer cannot parse from a system identifier, so this method simply throws an XMLException when invoked.

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

### parseMemoryNP

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

The DOMSerializer cannot parse from a system identifier, so this method simply throws an XMLException when invoked.

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