#include <xml/dom/xmlengdeserializerdom.h>
class CXmlEngDeserializerDOM : public CBase |
Protected Attributes | |
---|---|
TPtrC8 | iBuffer |
RArray< TXmlEngDataContainer > * | iDataList |
RXmlEngDOMImplementation * | iImpl |
HBufC * | iInputFileName |
TXmlEngDeserializerType | iType |
Public Member Functions | |
---|---|
~CXmlEngDeserializerDOM() | |
IMPORT_C RXmlEngDocument | DeserializeL() |
IMPORT_C RXmlEngDocument | DeserializeL(const TDesC &, TXmlEngDeserializerType) |
IMPORT_C RXmlEngDocument | DeserializeL(RFs &, const TDesC &, TXmlEngDeserializerType) |
IMPORT_C RXmlEngDocument | DeserializeL(const TDesC8 &, TXmlEngDeserializerType) |
IMPORT_C RArray< TXmlEngDataContainer > * | ExternalData() |
IMPORT_C CXmlEngDeserializerDOM * | NewL() |
IMPORT_C void | SetInputBuffer(const TDesC8 &, TXmlEngDeserializerType) |
IMPORT_C void | SetInputFileL(const TDesC &, TXmlEngDeserializerType) |
IMPORT_C void | UseDOMImplementationL(RXmlEngDOMImplementation &) |
IMPORT_C void | UseExternalDataL(RArray< TXmlEngDataContainer > &) |
Protected Member Functions | |
---|---|
CXmlEngDeserializerDOM() |
Deserializes a XML file to a DOM tree.
// create deserializer CXmlEngDeserializerDOM* deserializer = CXmlEngDeserializerDOM::NewL(); CleanupStack::PushL(deserializer); // configure deserializer deserializer->SetInputFileL(KInputFile, EDeserializerGZip); // Set the DOM Implementation deserializer->UseDOMImplementationL(iDomImpl); // deserialize RXmlEngDocument doc = deserializer->DeserializeL(); CleanupStack::PopAndDestroy();// deserializer
IMPORT_C RXmlEngDocument | DeserializeL | ( | ) |
Deserializes the file or buffer previously set by SetInputFileL() or SetInputBuffer() and creates a new document that holds the DOM tree.
One of the system-wide error codes
Returns: The document that holds the DOM tree
IMPORT_C RXmlEngDocument | DeserializeL | ( | const TDesC & | aFileName, |
TXmlEngDeserializerType | aType = EDeserializerDefault | |||
) |
Deserializes the given file and creates a new document that holds the DOM tree. Any filename previously set with SetInputFileL() is ignored.
One of the system wide error codes
Parameter | Description |
---|---|
aFileName | The file to be deserialized |
aType | The deserialization format |
Returns: The document that holds the DOM tree
IMPORT_C RXmlEngDocument | DeserializeL | ( | RFs & | aRFs, |
const TDesC & | aFileName, | |||
TXmlEngDeserializerType | aType = EDeserializerDefault | |||
) |
Deserializes the given file and creates a new document that holds the DOM tree. Any filename previously set with SetInputFileL() is ignored.
One of the system wide error codes
Parameter | Description |
---|---|
aRFs | File Server session |
aFileName | The file to be deserialized |
aType | The deserialization format |
Returns: The document that holds the DOM tree
IMPORT_C RXmlEngDocument | DeserializeL | ( | const TDesC8 & | aBuffer, |
TXmlEngDeserializerType | aType = EDeserializerDefault | |||
) |
Deserializes the given buffer and creates a new document that holds the DOM tree. Any buffer previously set with SetInputBuffer() is ignored.
One of the system wide error codes
Parameter | Description |
---|---|
aBuffer | Buffer to be parsed |
aType | Input type |
Returns: The document that holds the DOM tree
IMPORT_C RArray< TXmlEngDataContainer > * | ExternalData | ( | ) |
Gets the list of external data containers.
Returns: The list of data containers or NULL if no external data is registered
IMPORT_C CXmlEngDeserializerDOM * | NewL | ( | ) | [static] |
Returns: The DOM deserializer instance
IMPORT_C void | SetInputBuffer | ( | const TDesC8 & | aBuffer, |
TXmlEngDeserializerType | aType = EDeserializerDefault | |||
) |
Sets the input to to buffer and saves the buffer for later deserialization.
Parameter | Description |
---|---|
aBuffer | The buffer to deserialize |
aType | The deserialization format |
IMPORT_C void | SetInputFileL | ( | const TDesC & | aFileName, |
TXmlEngDeserializerType | aType = EDeserializerDefault | |||
) |
One of the system-wide error codes
Parameter | Description |
---|---|
aFileName | The file name of the file to deserialize |
aType | The deserialization format |
IMPORT_C void | UseDOMImplementationL | ( | RXmlEngDOMImplementation & | aImpl | ) |
Does not leave
Parameter | Description |
---|---|
aImpl | The DOM implementation |
IMPORT_C void | UseExternalDataL | ( | RArray< TXmlEngDataContainer > & | aList | ) |
Sets a list of data containers and indicates that the XML to be deserialized contains references (such as xop:include) to data stored outside the DOM tree.
Upon deserialization, the references are substituted with the matching data containers and returned via the content handler.
This often occurs when a multipart MIME message is received. The text XML content may be in one part, while the binary content is in another part. Each part containing binary content must be placed into a data container using RXmlEngDocument::CreateBinaryContainerL() or similar. When deserialization of the XML occurs, the data containers are retrieved by content-id.
Ownership is not transferred and the list must stay in scope for the lifetime of the deserializer.
Any system-wide error code
Parameter | Description |
---|---|
aList | The list of data containers |