|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
�PREV CLASS�� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CReader: public Sax::CXmlStream { public: CReader(const Dom::XNode &pNode); ~CReader(); public: void SetNode(const Dom::XNode &pNode); Dom::XNode GetNode(); void SetNamespaces(bool bNamespaces); bool GetNamespaces(); public: void SetContentHandler(const Sax::XContentHandler &pHandler); Sax::XContentHandler GetContentHandler(); void Start(); };
The DOM reader.
This class provides implementation of XML stream that generates a sequence of SAX content events based on the content of a subtree of a DOM or XDM document.
An arbitrary DOM/XDM node can serve as a root of a subtree
containing the source data. If the root node represents the
DOM/XDM document, the content of the entire document will
be transformed into a sequence of events. If the root node has
any other type, the content of the subtree rooted at this
node, including the node itself, will be transformed into
a sequence of events.
In any case, the generated sequence of events will be started
with the
StartDocument
event and terminated with
the
EndDocument
, even if the root node does
not represent the entire document.
For each particular DOM reader, an application programmer can specify, whether this reader must perform SAX namespace processing.
Sax::CContentHandler, Dom::INode
Constructor/Destructor Summary | |
CReader
(const Dom::XNode &pNode);
����������Constructs the reader. |
|
~CReader
();
����������Destroys the reader. |
Function Summary | |
void
|
SetNode
(const Dom::XNode &pNode);
����������Sets the root node of a subtree containing the source data. |
Dom::XNode
|
GetNode
();
����������Returns the root node of a subtree containing the source data. |
void
|
SetNamespaces
(bool bNamespaces);
����������Specifies whether the XML stream implemented by this reader must perform SAX namespace processing. |
bool
|
GetNamespaces
();
����������Tests whether the XML stream implemented by this reader must perform SAX namespace processing. |
void
|
SetContentHandler
(const Sax::XContentHandler &pHandler);
����������Associates a SAX content handler with the XML stream implemented by this reader. |
Sax::XContentHandler
|
GetContentHandler
();
����������Returns a SAX content handler associated with the XML stream implemented by this reader. |
void
|
Start
();
����������Starts the XML stream implemented by this reader. |
Constructor/Destructor Detail |
CReader(const Dom::XNode &pNode);
Constructs the reader.
pNode
- the root node of a subtree
containing the source data~CReader();
Destroys the reader.
Function Detail |
void SetNode(const Dom::XNode &pNode);
Sets the root node of a subtree containing the source data.
This function cannot be called if the reader is started
(that is, the member function
Start
was called
and had not finish processing yet).
pNode
- the root node of a subtree
containing the source dataDom::XNode GetNode();
Returns the root node of a subtree containing the source data.
void SetNamespaces(bool bNamespaces);
Specifies whether the XML stream implemented by this reader must perform SAX namespace processing.
bNamespaces
-
true
if namespace
processing is required;
false
otherwisebool GetNamespaces();
Tests whether the XML stream implemented by this reader must perform SAX namespace processing.
true
if namespace
processing is performed;
false
otherwisevoid SetContentHandler(const Sax::XContentHandler &pHandler);
Associates a SAX content handler with the XML stream implemented by this reader.
pHandler
- the SAX content handlerSax::XContentHandler GetContentHandler();
Returns a SAX content handler associated with the XML stream implemented by this reader.
NULL
if no content
handler was specifiedvoid Start();
Starts the XML stream implemented by this reader.
When called, this function generates a sequence of SAX content events for the specified subtree, calling an approptiate member function of the associated content handler (if defined) for each event. It does not return until the entire sequence of events is produced (unless a fatal error is encountered).
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
�PREV CLASS�� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |