|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS ��NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CXmlFilterImpl: virtual public CXmlFilter, virtual public CEntityResolver, virtual public CDtdHandler, virtual public CContentHandler, virtual public CErrorHandler { public: CXmlFilterImpl(); CXmlFilterImpl(CXmlReader *pParent); ~CXmlFilterImpl(); public: void SetParent(const CXmlReader *pParent); CXmlReader *GetParent(); public: void SetFeature(const WCHAR *pszName, bool bValue); bool GetFeature(const WCHAR *pszName); void SetProperty( const WCHAR *pszName, CInterface *pValue); CInterface *GetProperty(const WCHAR *pszName); void SetEntityResolver(CEntityResolver *pResolver); CEntityResolver *GetEntityResolver(); void SetDtdHandler(CDtdHandler *pHandler); CDtdHandler *GetDtdHandler(); void SetContentHandler(CContentHandler *pHandler); CContentHandler *GetContentHandler(); void SetErrorHandler(CErrorHandler *pHandler); CErrorHandler *GetErrorHandler(); void Parse(CInputSource *pInput); void Parse(const WCHAR *pszSystemId); void SetNamespaces(bool bNamespaces); bool GetNamespaces(); void SetInputSource(CInputSource *pInput); CInputSource *GetInputSource(); void Start(); public: XInputSource ResolveEntity( const WCHAR *pszPublicId, const WCHAR *pszSystemId); public: void NotationDecl( const WCHAR *pszName, const WCHAR *pszPublicId, const WCHAR *pszSystemId); void UnparsedEntityDecl( const WCHAR *pszName, const WCHAR *pszPublicId, const WCHAR *pszSystemId, const WCHAR *pszNotationName); public: void SetDocumentLocator(CLocator *pLocator); void StartDocument(); void EndDocument(); void StartPrefixMapping( const WCHAR *pszPrefix, const WCHAR *pszUri); void EndPrefixMapping(const WCHAR *pszPrefix); void StartElement( const WCHAR *pszUri, const WCHAR *pszLocalName, const WCHAR *pszQName, CAttributes *pAtts); void EndElement( const WCHAR *pszUri, const WCHAR *pszLocalName, const WCHAR *pszQName); void Characters(const WCHAR *pCh, int nLength); void IgnorableWhitespace(const WCHAR *pCh, int nLength); void ProcessingInstruction( const WCHAR *pszTarget, const WCHAR *pszData); void SkippedEntity(const WCHAR *pszName); public: void Warning(CSaxParseException *pException); void Error(CSaxParseException *pException); void FatalError(CSaxParseException *pException); }; typedef XInterface<CXmlFilterImpl> XXmlFilterImpl;
The base class for deriving XML filters.
This class is designed to sit between an
CXmlReader
and the client application's event handlers. By default, it
does nothing but pass requests up to the reader and events
on to the handlers unmodified, but subclasses can override
specific methods to modify the event stream or the configuration
requests as they pass through.
CAttributes, CContentHandler, CDtdHandler, CEntityResolver, CErrorHandler, CInputSource, CLocator, CSaxParseException, CXmlReader
Constructor/Destructor Summary | |
CXmlFilterImpl
();
����������Constructs the empty XML filter, with no parent. |
|
CXmlFilterImpl
(CXmlReader *pParent);
����������Constructs the XML filter with the specified parent. |
|
~CXmlFilterImpl
();
����������Destroys the XML filter. |
Function Summary | |
void
|
SetParent
(CXmlReader *pParent);
����������Sets the parent reader. |
CXmlReader�*
|
GetParent
();
����������Gets the parent reader. |
void
|
SetFeature
(const WCHAR *pszName, bool bValue);
����������Sets the state of a feature. |
bool
|
GetFeature
(const WCHAR *pszName);
����������Looks up the state of a feature. |
void
|
SetProperty
(const WCHAR *pszName, CInterface *pValue);
����������Sets the value of a property. |
CInterface�*
|
GetProperty
(const WCHAR *pszName);
����������Looks up the value of a property. |
void
|
SetEntityResolver
(CEntityResolver *pResolver);
����������Sets the entity resolver. |
CEntityResolver�*
|
GetEntityResolver
();
����������Gets the current entity resolver. |
void
|
SetDtdHandler
(CDtdHandler *pHandler);
����������Sets the DTD event handler. |
CDtdHandler�*
|
GetDtdHandler
();
����������Gets the current DTD event handler. |
void
|
SetContentHandler
(CContentHandler *pHandler);
����������Sets the content event handler. |
CContentHandler�*
|
GetContentHandler
();
����������Gets the content event handler. |
void
|
SetErrorHandler
(CErrorHandler *pHandler);
����������Sets the error event handler. |
CErrorHandler�*
|
GetErrorHandler
();
����������Gets the current error event handler. |
void
|
Parse
(CInputSource *pInput);
����������Parses a docment. |
void
|
Parse
(const WCHAR *pszSystemId);
����������Parses a document. |
void
|
SetNamespaces
(bool bNamespaces);
����������Specifies whether content events generated by this filter must provide namespace information. |
bool
|
GetNamespaces
();
����������Tests whether content events generated by this filter provide namespace information. |
void
|
SetInputSource
(CInputSource *pInput);
����������Sets the input source. |
CInputSource�*
|
GetInputSource
();
����������Gets the current input source. |
void
|
Start
();
����������Starts the XML reader implemented by this filter. |
XInputSource
|
ResolveEntity
(const WCHAR *pszPublicId, const WCHAR *pszSystemId);
����������Filters an external entity resolution. |
void
|
NotationDecl
(const WCHAR *pszName, const WCHAR *pszPublicId, const WCHAR *pszSystemId);
����������Filters a notation declaration event. |
void
|
UnparsedEntityDecl
(const WCHAR *pszName, const WCHAR *pszPublicId, const WCHAR *pszSystemId, const WCHAR *pszNotationName);
����������Filters an unparsed entity declaration event. |
void
|
SetDocumentLocator
(CLocator *pLocator);
����������Filters a new document locator event. |
void
|
StartDocument
();
����������Filters a start document event. |
void
|
EndDocument
();
����������Filters an end document event. |
void
|
StartPrefixMapping
(const WCHAR *pszPrefix, const WCHAR *pszUri);
����������Filters a start namespace prefix mapping event. |
void
|
EndPrefixMapping
(const WCHAR *pszPrefix);
����������Filters an end namespace prefix mapping event. |
void
|
StartElement
(const WCHAR *pszUri, const WCHAR *pszLocalName, const WCHAR *pszQName, CAttributes *pAtts);
����������Filters a start element event. |
void
|
EndElement
(const WCHAR *pszUri, const WCHAR *pszLocalName, const WCHAR *pszQName);
����������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 WCHAR *pszTarget, const WCHAR *pszData);
����������Filters a processing instruction event. |
void
|
SkippedEntity
(const WCHAR *pszName);
����������Filters a skipped entity event. |
void
|
Warning
(CSaxParseException *pException);
����������Filters a warning event. |
void
|
Error
(CSaxParseException *pException);
����������Filters an error event. |
void
|
FatalError
(CSaxParseException *pException);
����������Filters a fatal error event. |
Constructor/Destructor Detail |
CXmlFilterImpl();
Constructs the empty XML filter, with no parent.
This filter will have no parent: you must assign a parent
before you start a parse or do any configuration with
SetFeature
or
SetProperty
.
CXmlFilterImpl(CXmlReader *pParent);
Constructs the XML filter with the specified parent.
pParent
- the parent XML reader~CXmlFilterImpl();
Destroys the XML filter.
Function Detail |
void SetParent(CXmlReader *pParent);
Sets the parent reader.
This is the XML reader from which this filter will obtain its events and to which it will pass its configuration requests. The parent may itself be another filter.
If there is no parent reader set, any attempt to parse or to set or get a feature or property will fail.
pParent
- the parent XML readerCXmlReader *GetParent();
Gets the parent reader.
NULL
if none is setvoid SetFeature(const WCHAR *pszName, bool bValue);
Sets the state of a feature.
This will always fail if the parent is
NULL
.
pszName
- the feature namebValue
- the requested feature statebool GetFeature(const WCHAR *pszName);
Looks up the state of a feature.
This will always fail if the parent is
NULL
.
pszName
- the feature namevoid SetProperty( const WCHAR *pszName, CInterface *pValue);
Sets the value of a property.
This will always fail if the parent is
NULL
.
pszName
- the property namepValue
- the requested property valueCInterface *GetProperty(const WCHAR *pszName);
Looks up the value of a property.
pszName
- the property namevoid SetEntityResolver(CEntityResolver *pResolver);
Sets the entity resolver.
pResolver
- the new entity resolverCEntityResolver *GetEntityResolver();
Gets the current entity resolver.
NULL
if none was setvoid SetDtdHandler(CDtdHandler *pHandler);
Sets the DTD event handler.
pHandler
- the new DTD handlerCDtdHandler *GetDtdHandler();
Gets the current DTD event handler.
NULL
if none was setvoid SetContentHandler(CContentHandler *pHandler);
Sets the content event handler.
pHandler
- the new content handlerCContentHandler *GetContentHandler();
Gets the content event handler.
NULL
if none was setvoid SetErrorHandler(CErrorHandler *pHandler);
Sets the error event handler.
pHandler
- the new error handlerCErrorHandler *GetErrorHandler();
Gets the current error event handler.
NULL
if none was setvoid Parse(CInputSource *pInput);
Parses a docment.
pInput
- the input source for
the document entityvoid Parse(const WCHAR *pszSystemId);
Parses a document.
pszSystemId
- the system identifier as a fully-qualified URIvoid SetNamespaces(bool bNamespaces);
Specifies whether content events generated by this filter must provide namespace information.
bNamespaces
-
true
if content events
generated by this filter must provide namespace information;
false
otherwisebool GetNamespaces();
Tests whether content events generated by this filter provide namespace information.
true
if content events
generated by this filter provide namespace information;
false
otherwisevoid SetInputSource(CInputSource *pInput);
Sets the input source.
This method is useful when the XML reader implemented
by this filter is started
using the
CXmlReader::Start
method.
pInput
- the input sourceCInputSource *GetInputSource();
Gets the current input source.
NULL
if none has been registeredvoid Start();
Starts the XML reader implemented by this filter.
XInputSource ResolveEntity( const WCHAR *pszPublicId, const WCHAR *pszSystemId);
Filters an external entity resolution.
pszPublicId
- the entity's public identifier,
or the empty stringpszSystemId
- the entity's system identifiervoid NotationDecl( const WCHAR *pszName, const WCHAR *pszPublicId, const WCHAR *pszSystemId);
Filters a notation declaration event.
pszName
- the notation namepszPublicId
- the notation's public identifier,
or the empty stringpszSystemId
- the notation's system identifier,
or the empty stringvoid UnparsedEntityDecl( const WCHAR *pszName, const WCHAR *pszPublicId, const WCHAR *pszSystemId, const WCHAR *pszNotationName);
Filters an unparsed entity declaration event.
pszName
- the entity namepszPublicId
- the entity's public identifier,
or the empty stringpszSystemId
- the entity's system identifier,
or the empty stringtpszNotationName
- the name of the associated notationvoid SetDocumentLocator(CLocator *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 WCHAR *pszPrefix, const WCHAR *pszUri);
Filters a start namespace prefix mapping event.
pszPrefix
- the namespace prefixpszUri
- the namespace URIvoid EndPrefixMapping(const WCHAR *pszPrefix);
Filters an end namespace prefix mapping event.
pszPrefix
- the namespace prefixvoid StartElement( const WCHAR *pszUri, const WCHAR *pszLocalName, const WCHAR *pszQName, CAttributes *pAtts);
Filters a start element event.
pszUri
- the element's namespace URI, or the empty stringpszLocalName
- the element's local name, or the empty stringpszQName
- the element's qualified (prefixed) name,
or the empty stringpAtts
- the element's attributesvoid EndElement( const WCHAR *pszUri, const WCHAR *pszLocalName, const WCHAR *pszQName);
Filters an end element event.
pszUri
- the element's namespace URI, or the empty stringpszLocalName
- the element's local name, or the empty stringpszQName
- 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 WCHAR *pszTarget, const WCHAR *pszData);
Filters a processing instruction event.
pszTarget
- the procession instruction targetpszData
- the processing instruction datavoid SkippedEntity(const WCHAR *pszName);
Filters a skipped entity event.
pszName
- the name of the skipped entityvoid Warning(CSaxParseException *pException);
Filters a warning event.
pException
- the exception representing the warningvoid Error(CSaxParseException *pException);
Filters an error event.
pException
- the exception representing the errorvoid FatalError(CSaxParseException *pException);
Filters a fatal error event.
pException
- the exception representing the error
|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS ��NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |