Unicorn XML Toolkit
Version 1.00.00

Namespace SxpDom
Class CDomDocumentHandler

class CDomDocumentHandler: public IDocumentHandler {
public:
    CDomDocumentHandler(
        const XDocument &pDocument,
        bool bSupportNamespaces=true);
    ~CDomDocumentHandler();
public:
    void SetDocumentLocator(const XLocator &pLocator);
    void StartDocument();
    void EndDocument();
    void StartElement(const CString &strName);
    void EndElement();
    void StartAttribute(const CString &strName);
    void EndAttribute();
    void CharacterData(
        const WCHAR *pData, int nSize);
    void StartComment();
    void EndComment();
    void StartCdataSection();
    void EndCdataSection();
    void EntityReference(const CString &strName);
    void ProcessingInstruction(
        const CString &strTarget, const CString &strData);
    };

The document handler implementing SXP to DOM/XDM adapter.

The adapter reads the sequence of SXP document events and creates a DOM or XDM document based on the content supplied by these events.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
Sxp::ILocator, Dom::IDocument
Constructor/Destructor Summary
CDomDocumentHandler (const XDocument &pDocument, bool bSupportNamespaces=true);
����������Constructs the document handler.
~CDomDocumentHandler ();
����������Destroys the document handler.

Function Summary
void SetDocumentLocator (const XLocator &pLocator);
����������Receives the object for locating the origin of SXP document events.
void StartDocument ();
����������Receives notification of the beginning of a document.
void EndDocument ();
����������Receives notification of the end of a document.
void StartElement (const CString &strName);
����������Receives notification of the beginning of an element.
void EndElement ();
����������Receives notification of the end of an element.
void StartAttribute (const CString &strName);
����������Receives notification of the beginning of an attribute.
void EndAttribute ();
����������Receives notification of the end of an attribute.
void CharacterData (const WCHAR *pData, int nSize);
����������Receives notification of character data.
void StartComment ();
����������Receives notification of the beginning of a comment.
void EndComment ();
����������Receives notification of the end of a comment.
void StartCdataSection ();
����������Receives notification of the beginning of a CDATA section.
void EndCdataSection ();
����������Receives notification of the end of a CDATA section.
void EntityReference (const CString &strName);
����������Receives notification of an entity reference.
void ProcessingInstruction (const CString &strTarget, const CString &strData);
����������Receives notification of a processing instruction.

Constructor/Destructor Detail

CDomDocumentHandler

CDomDocumentHandler(
    const XDocument &pDocument,
    bool bSupportNamespaces=true);

Constructs the document handler.

Parameters:
pDocument - the document node with no children; this is the root of the document to be created
bSupportNamespaces - true if the target document conforms to XDM; false if the target document conforms to DOM

~CDomDocumentHandler

~CDomDocumentHandler();

Destroys the document handler.

Function Detail

SetDocumentLocator

void SetDocumentLocator(const XLocator &pLocator);

Receives the object for locating the origin of SXP document events.

Parameters:
pLocator - the locator object

StartDocument

void StartDocument();

Receives notification of the beginning of a document.

EndDocument

void EndDocument();

Receives notification of the end of a document.

StartElement

void StartElement(const CString &strName);

Receives notification of the beginning of an element.

Parameters:
strName - the element type name

EndElement

void EndElement();

Receives notification of the end of an element.

StartAttribute

void StartAttribute(const CString &strName);

Receives notification of the beginning of an attribute.

Parameters:
strName - the attribute name

EndAttribute

void EndAttribute();

Receives notification of the end of an attribute.

CharacterData

void CharacterData(
    const WCHAR *pData, int nSize);

Receives notification of character data.

Parameters:
pData - the array of characters
nSize - the number of characters to read from the array

StartComment

void StartComment();

Receives notification of the beginning of a comment.

EndComment

void EndComment();

Receives notification of the end of a comment.

StartCdataSection

void StartCdataSection();

Receives notification of the beginning of a CDATA section.

EndCdataSection

void EndCdataSection();

Receives notification of the end of a CDATA section.

EntityReference

void EntityReference(const CString &strName);

Receives notification of an entity reference.

Parameters:
strName - the entity name

ProcessingInstruction

void ProcessingInstruction(
    const CString &strTarget, const CString &strData);

Receives notification of a processing instruction.

Parameters:
strTarget - the processing instruction target
strData - the processing instruction data; the empty string if none was supplied

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.