CSenXmlReader Class Reference

API published in: S60 3rd Ed

Link against: senxml.lib

Capability Information

Required Capabilities

None


#include <senxmlreader.h>

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.

Public Member Functions

virtual IMPORT_C  ~CSenXmlReader ()
  Destructor.
virtual IMPORT_C void  SetContentHandler (MSenContentHandlerClient &aContentHandler)
  Method to allow client to register a content event handler (for XML) for the current reader.
virtual IMPORT_C TInt  EnabledParserFeature ()
  Method for checking which feature has been enabled in the parser.
virtual IMPORT_C TInt  ParserFeature ()
  DEPRECATED.
TInt  SetParserFeature (TInt aParserFeature)
  Method for enabling a parser feature.
IMPORT_C void  ParseL (const TDesC8 &aBuff)
  Parse an XML buffer.
IMPORT_C void  ParseL (RFs &aRFs, const TDesC &aFileToParse)
  Parse an XML document.
virtual void  OnStartDocumentL (const RDocumentParameters &aDocParam, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnEndDocumentL (TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnStartElementL (const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnEndElementL (const RTagInfo &aElement, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnContentL (const TDesC8 &aBytes, TInt aErrorCode)
virtual void  OnStartPrefixMappingL (const RString &aPrefix, const RString &aUri, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnEndPrefixMappingL (const RString &aPrefix, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnIgnorableWhiteSpaceL (const TDesC8 &aBytes, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnSkippedEntityL (const RString &aName, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnProcessingInstructionL (const TDesC8 &aTarget, const TDesC8 &aData, TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual void  OnError (TInt aErrorCode)
  Leave codes: KErrSenXmlContentHandlerNotSet if XML content handler for this XML reader has not been set.
virtual TAny *  GetExtendedInterface (const TInt32 aUid)
  This method obtains the interface matching the specified UID.

Static Public Member Functions

static IMPORT_C CSenXmlReader NewL ()
  Standard two-phase constructor.
static IMPORT_C CSenXmlReader NewLC ()
  Standard two-phase constructor.
static IMPORT_C CSenXmlReader NewL (TInt aParserFeature)
  A constructor with parser feature enabling.
static IMPORT_C CSenXmlReader NewLC (TInt aParserFeature)
  A constructor with parser feature enabling.

Protected Member Functions

IMPORT_C  CSenXmlReader (TInt aParserFeature)
  C++ constructor.
void  ConstructL ()
  Symbian 2nd phase constructor.
void  RecreateParserL ()
  This method re-initializes encapsulated CParser class instance.

Constructor & Destructor Documentation

virtual IMPORT_C CSenXmlReader::~CSenXmlReader  )  [virtual]
 

Destructor.

IMPORT_C CSenXmlReader::CSenXmlReader TInt  aParserFeature  )  [protected]
 

C++ constructor.


Member Function Documentation

void CSenXmlReader::ConstructL  )  [protected]
 

Symbian 2nd phase constructor.

virtual IMPORT_C TInt CSenXmlReader::EnabledParserFeature  )  [virtual]
 

Method for checking which feature has been enabled in the parser.

Returns:
the corresponding integer id of the feature
virtual TAny* CSenXmlReader::GetExtendedInterface const TInt32  aUid  )  [virtual]
 

This method obtains the interface matching the specified UID.

Parameters:
aUid  the UID identifying the required interface.
Returns:
NULL if no interface matching the UID is found. Otherwise, the this pointer cast to that interface. 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.
static IMPORT_C CSenXmlReader* CSenXmlReader::NewL TInt  aParserFeature  )  [static]
 

A constructor with parser feature enabling.

Parameters:
aParserFeature  is 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.
static IMPORT_C CSenXmlReader* CSenXmlReader::NewL  )  [static]
 

Standard two-phase constructor.

Returns:
pointer to a new CSenXmlReader instance.
static IMPORT_C CSenXmlReader* CSenXmlReader::NewLC TInt  aParserFeature  )  [static]
 

A constructor with parser feature enabling.

Parameters:
aParserFeature  is 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.
static IMPORT_C CSenXmlReader* CSenXmlReader::NewLC  )  [static]
 

Standard two-phase constructor.

Returns:
pointer to a new CSenXmlReader instance which is left on cleanup stack.
virtual void CSenXmlReader::OnContentL const TDesC8 &  aBytes,
TInt  aErrorCode
[virtual]
 
Parameters:
aBytes  is the actual XML data, content in UTF-8 form
aErrorCode  KErrNone, or some system-wide error code if an error has occured.
virtual void CSenXmlReader::OnEndDocumentL TInt  aErrorCode  )  [virtual]
 

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.

virtual void CSenXmlReader::OnEndElementL const RTagInfo &  aElement,
TInt  aErrorCode
[virtual]
 

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.

virtual void CSenXmlReader::OnEndPrefixMappingL const RString &  aPrefix,
TInt  aErrorCode
[virtual]
 

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.

virtual void CSenXmlReader::OnError TInt  aErrorCode  )  [virtual]
 

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.

virtual void CSenXmlReader::OnIgnorableWhiteSpaceL const TDesC8 &  aBytes,
TInt  aErrorCode
[virtual]
 

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.

virtual void CSenXmlReader::OnProcessingInstructionL const TDesC8 &  aTarget,
const TDesC8 &  aData,
TInt  aErrorCode
[virtual]
 

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.

virtual void CSenXmlReader::OnSkippedEntityL const RString &  aName,
TInt  aErrorCode
[virtual]
 

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.

virtual void CSenXmlReader::OnStartDocumentL const RDocumentParameters &  aDocParam,
TInt  aErrorCode
[virtual]
 

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.

virtual void CSenXmlReader::OnStartElementL const RTagInfo &  aElement,
const RAttributeArray &  aAttributes,
TInt  aErrorCode
[virtual]
 

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.

virtual void CSenXmlReader::OnStartPrefixMappingL const RString &  aPrefix,
const RString &  aUri,
TInt  aErrorCode
[virtual]
 

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.

IMPORT_C void CSenXmlReader::ParseL RFs &  aRFs,
const TDesC &  aFileToParse
 

Parse an XML document.

Parameters:
aRFs  An open filesession.
aFileToParse  Filename of file to parse.
IMPORT_C void CSenXmlReader::ParseL const TDesC8 &  aBuff  ) 
 

Parse an XML buffer.

Parameters:
aBuff  Buffer containing document to parse.
virtual IMPORT_C TInt CSenXmlReader::ParserFeature  )  [virtual]
 

DEPRECATED.

Use EnabledParserFeature() instead.

void CSenXmlReader::RecreateParserL  )  [protected]
 

This method re-initializes encapsulated CParser class instance.

virtual IMPORT_C void CSenXmlReader::SetContentHandler MSenContentHandlerClient aContentHandler  )  [virtual]
 

Method to allow client to register a content event handler (for XML) for the current reader.

Parameters:
aContentHandler  The new event handler.
TInt CSenXmlReader::SetParserFeature TInt  aParserFeature  ) 
 

Method for enabling a parser feature.

Parameters:
aParserFeature  is 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 occured.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top