Xml::MContentHandler Class Reference

#include <xml/contenthandler.h>

class Xml::MContentHandler
Public Member Functions
pure virtual TAny *GetExtendedInterface(const TInt32)
pure virtual voidOnContentL(const TDesC8 &, TInt)
pure virtual voidOnEndDocumentL(TInt)
pure virtual voidOnEndElementL(const RTagInfo &, TInt)
pure virtual voidOnEndPrefixMappingL(const RString &, TInt)
pure virtual voidOnError(TInt)
pure virtual voidOnIgnorableWhiteSpaceL(const TDesC8 &, TInt)
pure virtual voidOnProcessingInstructionL(const TDesC8 &, const TDesC8 &, TInt)
pure virtual voidOnSkippedEntityL(const RString &, TInt)
pure virtual voidOnStartDocumentL(const RDocumentParameters &, TInt)
pure virtual voidOnStartElementL(const RTagInfo &, const RAttributeArray &, TInt)
pure virtual voidOnStartPrefixMappingL(const RString &, const RString &, TInt)

Detailed Description

This class defines the interface required by a client of the xml framework. It allows a client to be placed in a chain with other clients, i.e. a Parser, a Validator, or a User, and therefore allows the flow of information between these links. It provides callbacks analogous to that of the SAX 2.0 interface.

See also: http://www.saxproject.org/apidoc/

Member Function Documentation

GetExtendedInterface ( const TInt32 )

TAny *GetExtendedInterface(const TInt32aUid)[pure virtual]

This method obtains the interface matching the specified uid.

ParameterDescription
aUidthe uid identifying the required interface.

Returns: 0 if no interface matching the uid is found. Otherwise, the this pointer cast to that interface.

OnContentL ( const TDesC8 &, TInt )

voidOnContentL(const TDesC8 &aBytes,
TIntaErrorCode
)[pure virtual]

This method is a callback that sends the content of the element. Not all the content may be returned in one go. The data may be sent in chunks. When an OnEndElementL is received this means there is no more content to be sent.

ParameterDescription
aBytesis the raw content data for the element. The client is responsible for converting the data to the required character set if necessary. In some instances the content may be binary and must not be converted.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnEndDocumentL ( TInt )

voidOnEndDocumentL(TIntaErrorCode)[pure virtual]

This method is a callback to indicate the end of the document.

ParameterDescription
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnEndElementL ( const RTagInfo &, TInt )

voidOnEndElementL(const RTagInfo &aElement,
TIntaErrorCode
)[pure virtual]

This method is a callback to indicate the end of the element has been reached.

ParameterDescription
aElementis a handle to the element's details.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnEndPrefixMappingL ( const RString &, TInt )

voidOnEndPrefixMappingL(const RString &aPrefix,
TIntaErrorCode
)[pure virtual]

This method is a notification of the end of the scope of a prefix-URI mapping. This method is called after the corresponding DoEndElementL method.

ParameterDescription
aPrefixis the Namespace prefix that was mapped.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnError ( TInt )

voidOnError(TIntaErrorCode)[pure virtual]

This method indicates an error has occurred.

ParameterDescription
aErrorCodeis the error code

OnIgnorableWhiteSpaceL ( const TDesC8 &, TInt )

voidOnIgnorableWhiteSpaceL(const TDesC8 &aBytes,
TIntaErrorCode
)[pure virtual]

This method is a notification of ignorable whitespace in element content.

ParameterDescription
aBytesare the ignored bytes from the document being parsed.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnProcessingInstructionL ( const TDesC8 &, const TDesC8 &, TInt )

voidOnProcessingInstructionL(const TDesC8 &aTarget,
const TDesC8 &aData,
TIntaErrorCode
)[pure virtual]

This method is a receive notification of a processing instruction.

ParameterDescription
aTargetis the processing instruction target.
aDatais the processing instruction data. If empty none was supplied.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnSkippedEntityL ( const RString &, TInt )

voidOnSkippedEntityL(const RString &aName,
TIntaErrorCode
)[pure virtual]

This method is a notification of a skipped entity. If the parser encounters an external entity it does not need to expand it - it can return the entity as aName for the client to deal with.

ParameterDescription
aNameis the name of the skipped entity.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnStartDocumentL ( const RDocumentParameters &, TInt )

voidOnStartDocumentL(const RDocumentParameters &aDocParam,
TIntaErrorCode
)[pure virtual]

This method is a callback to indicate the start of the document.

ParameterDescription
aDocParamSpecifies the various parameters of the document.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnStartElementL ( const RTagInfo &, const RAttributeArray &, TInt )

voidOnStartElementL(const RTagInfo &aElement,
const RAttributeArray &aAttributes,
TIntaErrorCode
)[pure virtual]

This method is a callback to indicate an element has been parsed.

ParameterDescription
aElementis a handle to the element's details.
aAttributescontains the attributes for the element.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.

OnStartPrefixMappingL ( const RString &, const RString &, TInt )

voidOnStartPrefixMappingL(const RString &aPrefix,
const RString &aUri,
TIntaErrorCode
)[pure virtual]

This method is a notification of the beginning of the scope of a prefix-URI Namespace mapping. This method is always called before the corresponding OnStartElementL method.

ParameterDescription
aPrefixis the Namespace prefix being declared.
aUriis the Namespace URI the prefix is mapped to.
aErrorCodeis the error code. If this is not KErrNone then special action may be required.