Unicorn XML Toolkit
Version 1.00.00

Namespace Sax
Class CXmlStream

class CXmlStream: virtual public CInterface {
public:
    CXmlStream();
    virtual ~CXmlStream();
public:
    virtual bool GetNamespaces() = 0;
    virtual void SetContentHandler(
        const XContentHandler &pHandler) = 0;
    virtual XContentHandler GetContentHandler() = 0;
    virtual void Start() = 0;
    };

The abstract interface to streams of content events.

This class is the light-weight counterpart of CXmlReader , serving as the base class for it. Having no prototype in the original SAX2 specification, this class was introduced to provide the mean for integration of various XML processing components.

Since:
1.00.00
Version:
1.00.00
Author:
C++ interfaces by Alexey Gokhberg; based on the original SAX2 specification by David Megginson
See Also:
CContentHandler
Constructor/Destructor Summary
CXmlStream ();
����������Constructs the XML stream.
~CXmlStream ();
����������Destroys the XML stream.

Function Summary
bool GetNamespaces ();
����������Tests whether content events generated by this stream provide namespace information.
void SetContentHandler (const XContentHandler &pHandler);
����������Allows an application to register a content event handler.
XContentHandler GetContentHandler ();
����������Gets the current content handler.
void Start ();
����������Starts the XML stream.

Constructor/Destructor Detail

CXmlStream

CXmlStream();

Constructs the XML stream.

~CXmlStream

virtual ~CXmlStream();

Destroys the XML stream.

Function Detail

GetNamespaces

virtual bool GetNamespaces() = 0;

Tests whether content events generated by this stream provide namespace information.

Returns:
true if content events generated by this stream provide namespace information; false otherwise

SetContentHandler

virtual void SetContentHandler(
    const XContentHandler &pHandler) = 0;

Allows an application to register a content event handler.

If the application does not register a content handler, all content events reported by the SAX reader will be silently ignored.

Applications may register a new or different handler in the middle of a parse, and the SAX reader must begin using the new handler immediately.

Parameters:
pHandler - the content handler

GetContentHandler

virtual XContentHandler GetContentHandler() = 0;

Gets the current content handler.

Returns:
the current content handler, or NULL if none has been registered

Start

virtual void Start() = 0;

Starts the XML stream.

When started, the XML stream will provide information about the XML document through the registered content handler.

This method is synchronous: it will not return until generation of XML stream has ended. If a client application wants to terminate the stream early, it should throw an exception.


Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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