RXmlEngDOMParser Class Reference

Link against: xmlengineDOM.lib


#include <
xmlengdomparser.h>

Detailed Description

DOM parser class implements methods for parsing XML data.

Parse XML data in one chunk. Data can be parsed from file or memory buffer.

Sample code for parsing from buffer:

      RXmlEngDOMImplementation domImpl;
      domImpl.OpenL();              
      RXmlEngDOMParser parser;
      parser.Open( domImpl );   
      RXmlEngDocument iDoc;
      iDoc =parser.ParseL( *aInput );   
      iDoc.Close();               
      parser.Close();
      domImpl.Close();

Sample code for parsing from file:

      RXmlEngDOMImplementation domImpl;
      domImpl.OpenL();              
      RXmlEngDOMParser parser;
      parser.Open( domImpl );   
      RXmlEngDocument iDoc;
      iDoc =parser.ParseFileL( aFileName );   
      iDoc.Close();               
      parser.Close();
      domImpl.Close();
Dll XmlEngineDOM.lib
Since:
S60 v3.1

Public Member Functions

IMPORT_C RXmlEngDOMParser ()
 Default constructor.
IMPORT_C TInt Open (RXmlEngDOMImplementation &aDOMImpl)
 Opens the parser.
IMPORT_C void Close ()
 Closes the parser.
IMPORT_C void ParseChunkL (const TDesC8 &aBuffer)
 Parses chunk of XML data from memory buffer and builds DOM RXmlEngDocument.
IMPORT_C RXmlEngDocument FinishL ()
 Creates document from parsed chunks of data.
IMPORT_C RXmlEngDocument ParseFileL (RFs &aRFs, const TDesC &aFileName, TUint aChunkSize=0)
 Parses XML file and builds DOM RXmlEngDocument.
IMPORT_C RXmlEngDocument ParseFileL (const TDesC &aFileName, TUint aChunkSize=0)
 Parses XML file and builds DOM RXmlEngDocument.
IMPORT_C RXmlEngDocument ParseL (const TDesC8 &aBuffer)
 Parses XML data from memory buffer and builds DOM RXmlEngDocument without chunks.
IMPORT_C TInt GetLastParsingError ()
 Return last parsing error code.

Constructor & Destructor Documentation

IMPORT_C RXmlEngDOMParser::RXmlEngDOMParser  ) 
 

Default constructor.


Member Function Documentation

IMPORT_C void RXmlEngDOMParser::Close  ) 
 

Closes the parser.

Since:
S60 v3.2
IMPORT_C RXmlEngDocument RXmlEngDOMParser::FinishL  ) 
 

Creates document from parsed chunks of data.

Should be called after parsing of allchunks. Ownership over returned RXmlEngDocument object is transferred to the caller of the method.

Since:
S60 v3.2
Returns:
RXmlEngDocument created document.
Leave:
KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory)
IMPORT_C TInt RXmlEngDOMParser::GetLastParsingError  ) 
 

Return last parsing error code.

Since:
S60 v3.2
Returns:
positive number
Note:
Error codes are positive numbers. User can find them in XmlEngDErrors.h
IMPORT_C TInt RXmlEngDOMParser::Open RXmlEngDOMImplementation aDOMImpl  ) 
 

Opens the parser.

Since:
S60 v3.2
Parameters:
aDOMImpl DOM implementation object
Returns:
KErrNone if succeed.
IMPORT_C void RXmlEngDOMParser::ParseChunkL const TDesC8 &  aBuffer  ) 
 

Parses chunk of XML data from memory buffer and builds DOM RXmlEngDocument.

Since:
S60 v3.2
Parameters:
aBuffer XML data buffer
Leave:
KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory)
IMPORT_C RXmlEngDocument RXmlEngDOMParser::ParseFileL const TDesC &  aFileName,
TUint  aChunkSize = 0
 

Parses XML file and builds DOM RXmlEngDocument.

Since:
S60 v3.2
Parameters:
aFileName File name
aChunkSize Size of chunk (if 0 chunks won't be used)
Returns:
Document handle
Leave:
KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory)
IMPORT_C RXmlEngDocument RXmlEngDOMParser::ParseFileL RFs &  aRFs,
const TDesC &  aFileName,
TUint  aChunkSize = 0
 

Parses XML file and builds DOM RXmlEngDocument.

Since:
S60 v3.2
Parameters:
aRFs File server session
aFileName File name
aChunkSize Size of chunk (if 0 chunks won't be used)
Returns:
Document handle
Leave:
KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory)
IMPORT_C RXmlEngDocument RXmlEngDOMParser::ParseL const TDesC8 &  aBuffer  ) 
 

Parses XML data from memory buffer and builds DOM RXmlEngDocument without chunks.

Since:
S60 v3.1
Parameters:
aBuffer XML data buffer
Returns:
Document handle
Leave:
KXmlEngErrParsing code (besides system I/O error codes)

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

Copyright © Nokia Corporation 2001-2007
Back to top