1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 XML Framework CParser API header file.
28 #include <stringpool.h>
29 #include <xml/contentprocessoruids.h> // needed for the typedef
38 class MContentHandler;
39 class RStringDictionaryCollection;
44 If you need to parse xml this is the class you need to use.
46 Default plain-text XML parser plug-in supports following character set encodings:
58 class CParser : public CBase
61 static IMPORT_C CParser* NewL(const TDesC8& aParserMimeType, MContentHandler& aCallback);
62 static IMPORT_C CParser* NewLC(const TDesC8& aParserMimeType, MContentHandler& aCallback);
64 static IMPORT_C CParser* NewL(const CMatchData& aCriteria, MContentHandler& aCallback);
65 static IMPORT_C CParser* NewLC(const CMatchData& aCriteria, MContentHandler& aCallback);
69 IMPORT_C void ParseBeginL();
70 IMPORT_C void ParseBeginL(const TDesC8& aDocumentMimeType);
71 IMPORT_C void ParseBeginL(const CMatchData& aCriteria);
72 IMPORT_C void ParseL(const TDesC8& aFragment);
73 IMPORT_C void ParseEndL();
75 IMPORT_C void SetProcessorChainL(const RContentProcessorUids& aPlugins);
77 IMPORT_C TInt EnableFeature(TInt aParserFeature);
78 IMPORT_C TInt DisableFeature(TInt aParserFeature);
79 IMPORT_C TBool IsFeatureEnabled(TInt aParserFeature) const;
81 IMPORT_C void AddPreloadedDictionaryL(const TDesC8& aPublicId);
83 IMPORT_C RStringPool& StringPool();
84 IMPORT_C RStringDictionaryCollection& StringDictionaryCollection();
88 void ConstructL(const TDesC8& aParserMimeType, MContentHandler& aCallback);
89 void ConstructL(const CMatchData& aMatchData, MContentHandler& aCallback);
93 IMPORT_C void ParseL(CParser& aParser, const TDesC8& aDocument);
94 IMPORT_C void ParseL(CParser& aParser, RFs& aFs, const TDesC& aFilename);
95 IMPORT_C void ParseL(CParser& aParser, RFile& aFile);