⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mycontenthandler.h

📁 Symbian下解析XML的代码,完全用API解析
💻 H
字号:
/*
============================================================================
 Name        : MyContentHandler.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CMyContentHandler declaration
============================================================================
*/

#ifndef MYCONTENTHANDLER_H
#define MYCONTENTHANDLER_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>

#include <xml\contenthandler.h> // for MContentHandler


using namespace Xml;

// CLASS DECLARATION

/**
*  CMyContentHandler
* 
*/
class CMyContentHandler :public MContentHandler
{
public: // Constructors and destructor

	/**
        * Destructor.
        */
	~CMyContentHandler();

        /**
        * Two-phased constructor.
        */
	static CMyContentHandler* NewL();

        /**
        * Two-phased constructor.
        */
	static CMyContentHandler* NewLC();

private:

	/**
        * Constructor for performing 1st stage construction
        */
	CMyContentHandler();

	/**
        * EPOC default constructor for performing 2nd stage construction
        */
	void ConstructL();

private: // from MContentHandler

	void OnStartDocumentL( const RDocumentParameters &aDocParam, TInt aErrorCode );
	void OnEndDocumentL( TInt aErrorCode );
	void OnStartElementL( const RTagInfo &aElement, const RAttributeArray &aAttributes,
		TInt aErrorCode );
	void OnEndElementL( const RTagInfo &aElement, TInt aErrorCode );
	void OnContentL( const TDesC8 &aBytes, TInt aErrorCode );
	void OnStartPrefixMappingL( const RString &aPrefix, const RString &aUri,
		TInt aErrorCode );
	void OnEndPrefixMappingL( const RString &aPrefix, TInt aErrorCode );
	void OnIgnorableWhiteSpaceL( const TDesC8 &aBytes, TInt aErrorCode );
	void OnSkippedEntityL( const RString &aName, TInt aErrorCode );
	void OnProcessingInstructionL( const TDesC8 &aTarget, const TDesC8 &aData,
		TInt aErrorCode);
	void OnError( TInt aErrorCode );
	TAny *GetExtendedInterface( const TInt32 aUid );
private:
	void AppendText( const TDesC& aText );
private:
	 HBufC*     iDisplayResult;
	 HBufC8*       iBuffer;

};

#endif // MYCONTENTHANDLER_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -