|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CXmlProcessor: virtual public CXmlStream, virtual public CContentHandler { public: CXmlProcessor(); ~CXmlProcessor(); public: void SetInputStream(const XXmlStream &pInputStream); XXmlStream GetInputStream(); public: bool GetNamespaces(void); void SetContentHandler(const XContentHandler &pContentHandler); XContentHandler GetContentHandler(); void Start(); public: void SetDocumentLocator(const XLocator &pLocator); void StartDocument(); void EndDocument(); void StartPrefixMapping( const CString &strPrefix, const CString &strUri); void EndPrefixMapping(const CString &strPrefix); void StartElement( const CString &strUri, const CString &strLocalName, const CString &strQName, const XAttributes &pAtts); void EndElement( const CString &strUri, const CString &strLocalName, const CString &strQName); void Characters(const WCHAR *pCh, int nLength); void IgnorableWhitespace(const WCHAR *pCh, int nLength); void ProcessingInstruction( const CString &strTarget, const CString &strData); void SkippedEntity(const CString &strName); };
The abstract interface to XML processors.
An XML processor is like an XML stream, except that it obtains its content events from another (input) XML stream rather than a primary source like an XML document or database. Processors can modify a stream of content events as they pass on to the final application.
This class is the light-weight counterpart of
CXmlFilter
.
Having no prototype in the original SAX2 specification,
this class was introduced to provide the mean for integration
of various XML processing components.
CAttributes, CContentHandler, CInputStream, CLocator
Constructor/Destructor Summary | |
CXmlProcessor
();
����������Constructs the XML processor. |
|
~CXmlProcessor
();
����������Destroys the XML processor. |
Function Summary | |
void
|
SetInputStream
(const XXmlStream &pInputStream);
����������Sets the input XML stream. |
XXmlStream
|
GetInputStream
();
����������Gets the input XML stream. |
bool
|
GetNamespaces
(void);
����������Tests whether content events generated by this processor provide namespace information. |
void
|
SetContentHandler
(const XContentHandler &pContentHandler);
����������Sets the content event handler. |
XContentHandler
|
GetContentHandler
();
����������Gets the content event handler. |
void
|
Start
();
����������Starts the XML stream implemented by this processor. |
void
|
SetDocumentLocator
(const XLocator &pLocator);
����������Filters a new document locator event. |
void
|
StartDocument
();
����������Filters a start document event. |
void
|
EndDocument
();
����������Filters an end document event. |
void
|
StartPrefixMapping
(const CString &strPrefix, const CString &strUri);
����������Filters a start namespace prefix mapping event. |
void
|
EndPrefixMapping
(const CString &strPrefix);
����������Filters an end namespace prefix mapping event. |
void
|
StartElement
(const CString &strUri, const CString &strLocalName, const CString &strQName, const XAttributes &pAtts);
����������Filters a start element event. |
void
|
EndElement
(const CString &strUri, const CString &strLocalName, const CString &strQName);
����������Filters an end element event. |
void
|
Characters
(const WCHAR *pCh, int nLength);
����������Filters a character data event. |
void
|
IgnorableWhitespace
(const WCHAR *pCh, int nLength);
����������Filters an ignorable whitespace event. |
void
|
ProcessingInstruction
(const CString &strTarget, const CString &strData);
����������Filters a processing instruction event. |
void
|
SkippedEntity
(const CString &strName);
����������Filters a skipped entity event. |
Constructor/Destructor Detail |
CXmlProcessor();
Constructs the XML processor.
~CXmlProcessor();
Destroys the XML processor.
Function Detail |
void SetInputStream(const XXmlStream &pInputStream);
Sets the input XML stream.
pInputStream
- the input XML streamXXmlStream GetInputStream();
Gets the input XML stream.
NULL
if none is setbool GetNamespaces(void);
Tests whether content events generated by this processor provide namespace information.
true
if content events
generated by this processor provide namespace information;
false
otherwisevoid SetContentHandler(const XContentHandler &pContentHandler);
Sets the content event handler.
pHandler
- the new content handlerXContentHandler GetContentHandler();
Gets the content event handler.
NULL
if none was setvoid Start();
Starts the XML stream implemented by this processor.
void SetDocumentLocator(const XLocator &pLocator);
Filters a new document locator event.
pLocator
- the document locatorvoid StartDocument();
Filters a start document event.
void EndDocument();
Filters an end document event.
void StartPrefixMapping( const CString &strPrefix, const CString &strUri);
Filters a start namespace prefix mapping event.
strPrefix
- the namespace prefixstrUri
- the namespace URIvoid EndPrefixMapping(const CString &strPrefix);
Filters an end namespace prefix mapping event.
strPrefix
- the namespace prefixvoid StartElement( const CString &strUri, const CString &strLocalName, const CString &strQName, const XAttributes &pAtts);
Filters a start element event.
strUri
- the element's namespace URI, or the empty stringstrLocalName
- the element's local name, or the empty stringstrQName
- the element's qualified (prefixed) name,
or the empty stringpAtts
- the element's attributesvoid EndElement( const CString &strUri, const CString &strLocalName, const CString &strQName);
Filters an end element event.
strUri
- the element's namespace URI, or the empty stringstrLocalName
- the element's local name, or the empty stringstrQName
- the element's qualified (prefixed) name,
or the empty stringvoid Characters(const WCHAR *pCh, int nLength);
Filters a character data event.
pCh
- the array of charactersnLength
- the number of characters to use from the arrayvoid IgnorableWhitespace(const WCHAR *pCh, int nLength);
Filters an ignorable whitespace event.
pCh
- the array of charactersnLength
- the number of characters to use from the arrayvoid ProcessingInstruction( const CString &strTarget, const CString &strData);
Filters a processing instruction event.
strTarget
- the procession instruction targetstrData
- the processing instruction datavoid SkippedEntity(const CString &strName);
Filters a skipped entity event.
strName
- the name of the skipped entity
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |