CSenXmlReader Class Reference

#include <mw/SenXmlReader.h>

Link against: SenXML.dll

class CSenXmlReader : public CBase

Inherits from

  • CSenXmlReader
    Public Member Functions
    virtual ~CSenXmlReader()
    virtual IMPORT_C TIntEnabledParserFeature()
    virtual TAny *GetExtendedInterface(const TInt32)
    IMPORT_C CSenXmlReader *NewL()
    IMPORT_C CSenXmlReader *NewL(TInt)
    IMPORT_C CSenXmlReader *NewL(const TDesC8 &)
    IMPORT_C CSenXmlReader *NewL(const TDesC8 &, TInt)
    IMPORT_C CSenXmlReader *NewLC()
    IMPORT_C CSenXmlReader *NewLC(TInt)
    IMPORT_C CSenXmlReader *NewLC(const TDesC8 &)
    IMPORT_C CSenXmlReader *NewLC(const TDesC8 &, TInt)
    virtual voidOnContentL(const TDesC8 &, TInt)
    virtual voidOnEndDocumentL(TInt)
    virtual voidOnEndElementL(const RTagInfo &, TInt)
    virtual voidOnEndPrefixMappingL(const RString &, TInt)
    virtual voidOnError(TInt)
    virtual voidOnIgnorableWhiteSpaceL(const TDesC8 &, TInt)
    virtual voidOnProcessingInstructionL(const TDesC8 &, const TDesC8 &, TInt)
    virtual voidOnSkippedEntityL(const RString &, TInt)
    virtual voidOnStartDocumentL(const RDocumentParameters &, TInt)
    virtual voidOnStartElementL(const RTagInfo &, const RAttributeArray &, TInt)
    virtual voidOnStartPrefixMappingL(const RString &, const RString &, TInt)
    IMPORT_C voidParseL(const TDesC8 &)
    IMPORT_C voidParseL(RFs &, const TDesC &)
    virtual IMPORT_C TIntParserFeature()
    virtual IMPORT_C voidSetContentHandler(MSenContentHandlerClient &)
    TInt SetParserFeature(TInt)
    Protected Member Functions
    CSenXmlReader(TInt)
    voidConstructL(const TDesC8 &)
    voidRecreateParserL()
    Inherited Functions
    CBase::CBase()
    CBase::Delete(CBase *)
    CBase::Extension_(TUint,TAny *&,TAny *)
    CBase::operator new(TUint)
    CBase::operator new(TUint,TAny *)
    CBase::operator new(TUint,TLeave)
    CBase::operator new(TUint,TLeave,TUint)
    CBase::operator new(TUint,TUint)
    CBase::~CBase()

    Detailed Description

    Class extends Symbian XML framework parser functionality Callers of this class must register some handler which will then receive XML callback events from underlying Symbian XML framework.
    Since
    Series60 3.0

    Constructor & Destructor Documentation

    CSenXmlReader ( TInt )

    IMPORT_CCSenXmlReader(TIntaParserFeature)[protected]

    C++ constructor.

    ~CSenXmlReader ( )

    IMPORT_C~CSenXmlReader()[virtual]

    Destructor.

    Member Function Documentation

    ConstructL ( const TDesC8 & )

    voidConstructL(const TDesC8 &aParserMimeType)[protected]

    Symbian 2nd phase constructor.

    ParameterDescription
    aParserMimeTypesets the MIME type of this XML parser.

    EnabledParserFeature ( )

    IMPORT_C TIntEnabledParserFeature()[virtual]
    Method for checking which feature has been enabled in the parser.
    Since
    Series60 3.0

    Returns: the corresponding integer id of the feature

    GetExtendedInterface ( const TInt32 )

    TAny *GetExtendedInterface(const TInt32aUid)[virtual]
    This method obtains the interface matching the specified UID.
    Since
    Series60 3.0
    ParameterDescription
    aUidthe UID identifying the required interface.

    Returns: NULL if no interface matching the UID is found or if content handler was not set. Otherwise, returns pointer to the interface.

    NewL ( )

    IMPORT_C CSenXmlReader *NewL()[static]
    Standard two-phase constructor. Creates new parser instance using default MIME type "text/xml" (KXmlParserMimeType).
    Since
    Series60 3.0

    Returns: pointer to a new CSenXmlReader instance.

    NewL ( TInt )

    IMPORT_C CSenXmlReader *NewL(TIntaParserFeature)[static]
    A constructor with parser feature enabling. Uses default parser MIME type "text/xml" (KXmlParserMimeType).
    Since
    Series60 3.0
    ParameterDescription
    aParserFeatureis typically some enumeration introduced in Xml::TParserFeature or some other feature introduced in some XML parser implementation. Leave codes: KErrArgument if aParserFeature value is negative.

    NewL ( const TDesC8 & )

    IMPORT_C CSenXmlReader *NewL(const TDesC8 &aParserMimeType)[static]
    A constructor with parser MIME type. Standard two-phase constructor.
    Since
    Series60 3.0
    ParameterDescription
    aParserMimeTypeis the XML parser MIME type. If descriptor is of zero-length, then default MIME type KXmlParserMimeType is used ("text/xml"). Availability of other MIME types depends on underlying parser implementation.

    Returns: pointer to a new CSenXmlReader instance.

    NewL ( const TDesC8 &, TInt )

    IMPORT_C CSenXmlReader *NewL(const TDesC8 &aParserMimeType,
    TIntaParserFeature
    )[static]
    A constructor with parser MIME type and parser feature enabling.
    Since
    Series60 3.0
    ParameterDescription
    aParserFeatureis typically some enumeration introduced in Xml::TParserFeature or some other feature introduced in some XML parser implementation. Leave codes: KErrArgument if aParserFeature value is negative.

    NewLC ( )

    IMPORT_C CSenXmlReader *NewLC()[static]
    Standard two-phase constructor. Creates new parser instance using default MIME type "text/xml" (KXmlParserMimeType).
    Since
    Series60 3.0

    Returns: pointer to a new CSenXmlReader instance which is left on cleanup stack.

    NewLC ( TInt )

    IMPORT_C CSenXmlReader *NewLC(TIntaParserFeature)[static]
    A constructor with parser feature enabling. Uses default parser MIME type "text/xml" (KXmlParserMimeType).
    Since
    Series60 3.0
    ParameterDescription
    aParserFeatureis typically some enumeration introduced in Xml::TParserFeature or some other feature introduced in some XML parser implementation. Leave codes: KErrArgument if aParserFeature value is negative.

    NewLC ( const TDesC8 & )

    IMPORT_C CSenXmlReader *NewLC(const TDesC8 &aParserMimeType)[static]
    A constructor with parser MIME type.
    Since
    Series60 3.0
    ParameterDescription
    aParserMimeTypeis the XML parser MIME type. If descriptor is of zero-length, then default MIME type KXmlParserMimeType is used ("text/xml"). Availability of other MIME types depends on underlying parser implementation.

    Returns: pointer to a new CSenXmlReader instance which is left on cleanup stack.

    NewLC ( const TDesC8 &, TInt )

    IMPORT_C CSenXmlReader *NewLC(const TDesC8 &aParserMimeType,
    TIntaParserFeature
    )[static]
    A constructor with parser MIME type and parser feature enabling.
    Since
    Series60 3.0
    ParameterDescription
    aParserMimeTypeis the XML parser MIME type. If descriptor is of zero-length, then default MIME type KXmlParserMimeType is used ("text/xml"). Availability of other MIME types depends on underlying parser implementation.
    aParserFeatureis typically some enumeration introduced in Xml::TParserFeature or some other feature introduced in some XML parser implementation. Leave codes: KErrArgument if aParserFeature value is negative.

    OnContentL ( const TDesC8 &, TInt )

    voidOnContentL(const TDesC8 &aBytes,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0
    ParameterDescription
    aBytesis the actual XML data, content in UTF-8 form
    aErrorCodeKErrNone, or some system-wide error code if an error has occured.

    OnEndDocumentL ( TInt )

    voidOnEndDocumentL(TIntaErrorCode)[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

    OnEndElementL ( const RTagInfo &, TInt )

    voidOnEndElementL(const RTagInfo &aElement,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

    OnEndPrefixMappingL ( const RString &, TInt )

    voidOnEndPrefixMappingL(const RString &aPrefix,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

    OnError ( TInt )

    voidOnError(TIntaErrorCode)[virtual]

    OnError is a callback method signalled by Symbian XML framework. Current implementation of this class issues a leave in original ParseL() call on any received by this callback implementation. Used leave code will be the received error code.

    Since
    Series60 3.0
    Currently any s

    If content handler was not set, ParseL will leaves with KErrSenXmlContentHandlerNotSet.

    ParameterDescription
    aErrorCodeis one of the Symbian XML framework errors listed in XmlFrameworkErrors.h

    OnIgnorableWhiteSpaceL ( const TDesC8 &, TInt )

    voidOnIgnorableWhiteSpaceL(const TDesC8 &aBytes,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

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

    voidOnProcessingInstructionL(const TDesC8 &aTarget,
    const TDesC8 &aData,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

    OnSkippedEntityL ( const RString &, TInt )

    voidOnSkippedEntityL(const RString &aName,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

    OnStartDocumentL ( const RDocumentParameters &, TInt )

    voidOnStartDocumentL(const RDocumentParameters &aDocParam,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

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

    voidOnStartElementL(const RTagInfo &aElement,
    const RAttributeArray &aAttributes,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

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

    voidOnStartPrefixMappingL(const RString &aPrefix,
    const RString &aUri,
    TIntaErrorCode
    )[virtual]
    Since
    Series60 3.0 Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set. This leave can be avoided calling SetContentHandlerL() method prior parsing some XML document.

    ParseL ( const TDesC8 & )

    IMPORT_C voidParseL(const TDesC8 &aBuff)
    Parse an XML buffer.
    Since
    Series60 3.0
    ParameterDescription
    aBuffBuffer containing document to parse. Note that this method will also leave, if an error is returned from Symbian XML framework. Here are the corresponding enums, and their respective error code values (-1000, -999... and up) (XML-specific errors returned by the XML parser) [from XmlParserErrors.h] EXmlParserError = -1000, EXmlSyntax = 2+EXmlParserError, // -998 EXmlNoElements, // -997 EXmlInvalidToken, // -996 EXmlUnclosedToken, // -995 EXmlPartialChar, // -994 EXmlTagMismatch, // -993 EXmlDuplicateAttribute, // -992 EXmlJunkAfterDocElement, // -991 EXmlPeRef, // -990 EXmlUndefinedEntity, // -989 EXmlRecursiveEntity, // -988 EXmlAsyncEntity, // -987 EXmlBadCharRef, // -986 EXmlBinaryEntityRef, // -985 EXmlAttributeExternalEntityRef, // -984 EXmlMisplacedPi, // -983 EXmlUnknownEncoding, // -982 EXmlIncorrectEncoding, // -981 EXmlUnclosedCdata, // -980 EXmlExternalEntityHandling, // -979 EXmlNotStandalone, // -978 EXmlUnexpectedState, // -977 EXmlEntityDeclInPe, // -976 EXmlDtdRequired, // -975 EXmlFeatureLockedWhileParsing // -974

    ParseL ( RFs &, const TDesC & )

    IMPORT_C voidParseL(RFs &aRFs,
    const TDesC &aFileToParse
    )
    Parse an XML document.
    Since
    Series60 3.0
    ParameterDescription
    aRFsAn open filesession.
    aFileToParseFilename of file to parse.

    ParserFeature ( )

    IMPORT_C TIntParserFeature()[virtual]

    RecreateParserL ( )

    voidRecreateParserL()[protected]
    This method re-initializes encapsulated CParser class instance.
    Since
    Series60 3.0

    SetContentHandler ( MSenContentHandlerClient & )

    IMPORT_C voidSetContentHandler(MSenContentHandlerClient &aContentHandler)[virtual]
    Method to allow client to register a content event handler (for XML) for the current reader.
    Since
    Series60 3.0
    ParameterDescription
    aContentHandlerThe new event handler.

    SetParserFeature ( TInt )

    TInt SetParserFeature(TIntaParserFeature)
    Method for enabling a parser feature.
    Since
    Series60 3.0
    ParameterDescription
    aParserFeatureis typically some enumeration introduced in Xml::TParserFeature or some other feature introduced in some XML parser implementation.

    Returns: KErrNone or some system-wide error code, if an error has occurred.