Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <contenthandler.h>

Class Xml::MContentHandler

class MContentHandler;

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.

Members

Defined in Xml::MContentHandler:

Related Topics


Member functions


OnStartDocumentL(const RDocumentParameters &,TInt)

virtual void OnStartDocumentL(const RDocumentParameters &aDocParam, TInt aErrorCode)=0;

Description

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

Parameters

const Xml::RDocumentParameters &aDocParam

Specifies the various parameters of the document.

TInt aErrorCode

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


OnEndDocumentL(TInt)

virtual void OnEndDocumentL(TInt aErrorCode)=0;

Description

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

Parameters

TInt aErrorCode

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


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

virtual void OnStartElementL(const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode)=0;

Description

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

Parameters

const Xml::RTagInfo &aElement

is a handle to the element's details.

const RArray &aAttributes

contains the attributes for the element.

TInt aErrorCode

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


OnEndElementL(const RTagInfo &,TInt)

virtual void OnEndElementL(const RTagInfo &aElement, TInt aErrorCode)=0;

Description

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

Parameters

const Xml::RTagInfo &aElement

is a handle to the element's details.

TInt aErrorCode

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


OnContentL(const TDesC8 &,TInt)

virtual void OnContentL(const TDesC8 &aBytes, TInt aErrorCode)=0;

Description

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.

Parameters

const TDesC8 &aBytes

is 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.

TInt aErrorCode

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


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

virtual void OnStartPrefixMappingL(const RString &aPrefix, const RString &aUri, TInt aErrorCode)=0;

Description

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.

Parameters

const RString &aPrefix

is the Namespace prefix being declared.

const RString &aUri

is the Namespace URI the prefix is mapped to.

TInt aErrorCode

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


OnEndPrefixMappingL(const RString &,TInt)

virtual void OnEndPrefixMappingL(const RString &aPrefix, TInt aErrorCode)=0;

Description

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.

Parameters

const RString &aPrefix

is the Namespace prefix that was mapped.

TInt aErrorCode

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


OnIgnorableWhiteSpaceL(const TDesC8 &,TInt)

virtual void OnIgnorableWhiteSpaceL(const TDesC8 &aBytes, TInt aErrorCode)=0;

Description

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

Parameters

const TDesC8 &aBytes

are the ignored bytes from the document being parsed.

TInt aErrorCode

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


OnSkippedEntityL(const RString &,TInt)

virtual void OnSkippedEntityL(const RString &aName, TInt aErrorCode)=0;

Description

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.

Parameters

const RString &aName

is the name of the skipped entity.

TInt aErrorCode

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


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

virtual void OnProcessingInstructionL(const TDesC8 &aTarget, const TDesC8 &aData, TInt aErrorCode)=0;

Description

This method is a receive notification of a processing instruction.

Parameters

const TDesC8 &aTarget

is the processing instruction target.

const TDesC8 &aData

is the processing instruction data. If empty none was supplied.

TInt aErrorCode

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


OnError(TInt)

virtual void OnError(TInt aErrorCode)=0;

Description

This method indicates an error has occurred.

Parameters

TInt aErrorCode

is the error code


GetExtendedInterface(const TInt32)

virtual TAny* GetExtendedInterface(const TInt32 aUid)=0;

Description

This method obtains the interface matching the specified uid.

Parameters

const TInt32 aUid

the uid identifying the required interface.

Return value

TAny *

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