epoc32/include/xml/parser.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/xml/parser.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/xml/parser.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,97 @@
     1.4 -parser.h
     1.5 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __PARSER_H__
    1.21 +#define __PARSER_H__
    1.22 +
    1.23 +/** 
    1.24 +@file
    1.25 +
    1.26 +XML Framework CParser API header file.
    1.27 +
    1.28 +@publishedAll
    1.29 +@released
    1.30 +*/
    1.31 +
    1.32 +#include <xml/contentprocessoruids.h> // needed for the typedef
    1.33 +#include <xml/plugins/elementstack.h> // needed for the typedef
    1.34 +
    1.35 +class RFs;
    1.36 +class RFile;
    1.37 +
    1.38 +namespace Xml
    1.39 +{
    1.40 +
    1.41 +class MContentHandler;
    1.42 +class RStringDictionaryCollection;
    1.43 +class TParserImpl;
    1.44 +class CMatchData;
    1.45 +
    1.46 +/** 
    1.47 +If you need to parse xml this is the class you need to use.
    1.48 +
    1.49 +Default plain-text XML parser plug-in  supports following character set encodings: 
    1.50 +
    1.51 +ISO_8859_1
    1.52 +US_ASCII
    1.53 +UTF_8
    1.54 +UTF_16
    1.55 +UTF_16BE
    1.56 +UTF_16LE
    1.57 +
    1.58 +@publishedAll
    1.59 +@released
    1.60 +*/
    1.61 +class CParser : public CBase
    1.62 +	{
    1.63 +public:
    1.64 +	static IMPORT_C CParser* NewL(const TDesC8& aParserMimeType, MContentHandler& aCallback);
    1.65 +	static IMPORT_C CParser* NewLC(const TDesC8& aParserMimeType, MContentHandler& aCallback);
    1.66 +	
    1.67 +	static IMPORT_C CParser* NewL(const CMatchData& aCriteria, MContentHandler& aCallback);
    1.68 +	static IMPORT_C CParser* NewLC(const CMatchData& aCriteria, MContentHandler& aCallback);
    1.69 +
    1.70 +	virtual ~CParser();
    1.71 +
    1.72 +	IMPORT_C void ParseBeginL();
    1.73 +	IMPORT_C void ParseBeginL(const TDesC8& aDocumentMimeType);
    1.74 +	IMPORT_C void ParseBeginL(const CMatchData& aCriteria);	
    1.75 +	IMPORT_C void ParseL(const TDesC8& aFragment);
    1.76 +	IMPORT_C void ParseEndL();
    1.77 +	
    1.78 +	IMPORT_C void SetProcessorChainL(const RContentProcessorUids& aPlugins);
    1.79 +
    1.80 +	IMPORT_C TInt EnableFeature(TInt aParserFeature);
    1.81 +	IMPORT_C TInt DisableFeature(TInt aParserFeature);
    1.82 +	IMPORT_C TBool IsFeatureEnabled(TInt aParserFeature) const;
    1.83 +
    1.84 +	IMPORT_C void AddPreloadedDictionaryL(const TDesC8& aPublicId);
    1.85 +
    1.86 +	IMPORT_C RStringPool& StringPool();
    1.87 +	IMPORT_C RStringDictionaryCollection& StringDictionaryCollection();
    1.88 +	
    1.89 +private:
    1.90 +	CParser();
    1.91 +	void ConstructL(const TDesC8& aParserMimeType, MContentHandler& aCallback);
    1.92 +	void ConstructL(const CMatchData& aMatchData, MContentHandler& aCallback);
    1.93 +	TParserImpl* iImpl;
    1.94 +	};
    1.95 +
    1.96 +IMPORT_C void ParseL(CParser& aParser, const TDesC8& aDocument);
    1.97 +IMPORT_C void ParseL(CParser& aParser, RFs& aFs, const TDesC& aFilename);
    1.98 +IMPORT_C void ParseL(CParser& aParser, RFile& aFile);
    1.99 +}
   1.100 +
   1.101 +#endif //__PARSER_H__