#include <gmxmlparser.h>
Link against: xmlparser.lib
class CMDXMLParser : public CActive |
Public Member Enumerations | |
---|---|
enum | TMDXMLParserInputCharWidth { EAscii, EUnicode } |
Public Member Functions | |
---|---|
~CMDXMLParser() | |
IMPORT_C CMDXMLDocument * | DetachXMLDoc() |
CMDXMLEntityConverter * | EntityConverter() |
IMPORT_C TInt | Error() |
IMPORT_C TXMLErrorCodeSeverity | ErrorSeverity() |
IMPORT_C CMDXMLParser * | NewL(MMDXMLParserObserver *) |
IMPORT_C CMDXMLParser * | NewL(MMDXMLParserObserver *, MXMLDtd *) |
IMPORT_C CMDXMLParser * | NewLC(MMDXMLParserObserver *) |
IMPORT_C CMDXMLParser * | NewLC(MMDXMLParserObserver *, MXMLDtd *) |
IMPORT_C TInt | ParseFile(RFs, const TDesC &) |
IMPORT_C TInt | ParseFile(RFile &) |
void | ParseSource(MMDXMLParserDataProvider *) |
IMPORT_C void | ParseSourceL(MMDXMLParserDataProvider *) |
IMPORT_C void | SetEntityConverter(CMDXMLEntityConverter *) |
IMPORT_C void | SetSourceCharacterWidth(TMDXMLParserInputCharWidth) |
IMPORT_C void | SetStoreInvalid(TBool) |
IMPORT_C void | SetWhiteSpaceHandlingMode(TBool) |
Inherited Attributes | |
---|---|
CActive::iStatus |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Creates a DOM structure from a given XML file.
The parsing operation is asynchronous and is initiated by a call to ParseFile(). On completion, the created DOM document can be retrieved through DetachXMLDoc().
Note the following ownership rules for the DOM document:
1. calling DetachXMLDoc() transfers ownership of the document to the client
2. if the parser is asked to parse a new file while it still owns an existing DOM document, it will delete the old document.
IMPORT_C CMDXMLDocument * | DetachXMLDoc | ( | ) |
Gets the created DOM.
This should be called after the conclusion of the parser process.
Note that the function sets the internal variable pointing to the document to NULL, so this function can only be called once per file parse. The caller takes ownership of the document, and must delete it when its use is complete.
CMDXMLEntityConverter * | EntityConverter | ( | ) |
Gets the entity converter.
IMPORT_C TXMLErrorCodeSeverity | ErrorSeverity | ( | ) | const |
Get the severity of the most severe error found.
IMPORT_C CMDXMLParser * | NewL | ( | MMDXMLParserObserver * | aParserObserver | ) | [static] |
Allocates and constructs a new XML parser, specifying a DTD.
Parameters | |
---|---|
aParserObserver | XML parser observer |
Leave Codes | |
---|---|
KErrNoMemory | Out of memory |
IMPORT_C CMDXMLParser * | NewL | ( | MMDXMLParserObserver * | aParserObserver, |
MXMLDtd * | aDtdRepresentation | |||
) | [static] |
Allocates and constructs a new XML parser, specifying a DTD.
Parameters | |
---|---|
aParserObserver | XML parser observer |
aDtdRepresentation | DTD validator |
Leave Codes | |
---|---|
KErrNoMemory | Out of memory |
IMPORT_C CMDXMLParser * | NewLC | ( | MMDXMLParserObserver * | aParserObserver | ) | [static] |
Allocates and constructs a new XML parser, leaving the object on the cleanup stack.
Parameters | |
---|---|
aParserObserver | XML parser observer |
Leave Codes | |
---|---|
KErrNoMemory | Out of memory |
IMPORT_C CMDXMLParser * | NewLC | ( | MMDXMLParserObserver * | aParserObserver, |
MXMLDtd * | aDtdRepresentation | |||
) | [static] |
Allocates and constructs a new XML parser, leaving the object on the cleanup stack.
Parameters | |
---|---|
aParserObserver | XML parser observer |
aDtdRepresentation | DTD validator |
Leave Codes | |
---|---|
KErrNoMemory | Out of memory |
IMPORT_C TInt | ParseFile | ( | RFile & | aFileHandleToParse | ) |
Parses a specified XML file into a DOM object tree.
Parses a specified XML file into a DOM object tree using an open file handle. The parser takes ownership of the open file handle and will close handle when completed.
Parameters | |
---|---|
aFileHandleToParse | An open file handle for the file to parse. Ownership of the file handle is passed. |
void | ParseSource | ( | MMDXMLParserDataProvider * | aSource | ) | [inline] |
Parses a specified XML Data Source into a DOM object tree. Use ParseSourceL() function in preference to ParseSource()
Parameters | |
---|---|
aSource | MMDXMLParserDataProvider pointer |
IMPORT_C void | ParseSourceL | ( | MMDXMLParserDataProvider * | aSource | ) |
Parses a specified XML Data Source into a DOM object tree.
Parameters | |
---|---|
aSource | MMDXMLParserDataProvider pointer |
IMPORT_C void | SetEntityConverter | ( | CMDXMLEntityConverter * | aEntityConverter | ) |
Sets the entity converter to be used for parsing. and take ownership of the passed entity converter
Parameters | |
---|---|
aEntityConverter | the entity converter to be used. |
IMPORT_C void | SetSourceCharacterWidth | ( | TMDXMLParserInputCharWidth | aWidth | ) |
Sets the input stream character width.
Parameters | |
---|---|
aWidth | Character width for incoming stream. Possible values are EAscii and EUnicode (representing Ascii/UTF8 and Unicode respectively). |
IMPORT_C void | SetStoreInvalid | ( | TBool | aStoreInvalid | ) |
Controls whether invalid elements and attributes are added to the DOM.
Parameters | |
---|---|
aStoreInvalid | ETrue if invalid content should be stored, EFalse otherwise. |
IMPORT_C void | SetWhiteSpaceHandlingMode | ( | TBool | aPreserve | ) |
Controls whether whitespaces are handled by XML parser or by client.
Parameters | |
---|---|
aPreserve | ETrue if all whitespaces should be preserved (handled by client), EFalse otherwise. |