#include <xml/dom/xmlengdeserializer.h>
class CXmlEngDeserializer : public CBase |
Public Member Functions | |
---|---|
virtual | ~CXmlEngDeserializer() |
virtual IMPORT_C void | DeserializeL() |
virtual IMPORT_C void | DeserializeL(const TDesC &, const TXmlEngParsingOptions &) |
virtual IMPORT_C void | DeserializeL(RFs &, const TDesC &, const TXmlEngParsingOptions &) |
virtual IMPORT_C void | DeserializeL(const TDesC8 &, const TXmlEngParsingOptions &) |
virtual IMPORT_C TInt | DisableFeature(TInt) |
virtual IMPORT_C TInt | EnableFeature(TInt) |
IMPORT_C RArray< TXmlEngDataContainer > * | ExternalData() |
TXmlEngDataContainer * | GetDataContainer(const TDesC8 &) |
virtual IMPORT_C TBool | IsFeatureEnabled(TInt) |
IMPORT_C CXmlEngDeserializer * | NewL(Xml::MContentHandler &, TXmlEngDeserializerType) |
virtual IMPORT_C const TXmlEngParsingOptions & | ParsingOptions() |
virtual IMPORT_C void | SetContentHandlerL(Xml::MContentHandler &) |
IMPORT_C void | SetInputBuffer(const TDesC8 &) |
IMPORT_C void | SetInputFileL(const TDesC &) |
virtual IMPORT_C void | SetParsingOptions(TXmlEngParsingOptions &) |
IMPORT_C void | UseExternalDataL(RArray< TXmlEngDataContainer > &) |
Provides deserialization and parsing for XML content using a SAX callback interface. Derived classes provide deserialization for specific formats, whereas this class defines the interface and provides default (plain XML) deserialization.
See also: TXmlEngDeserializerType
Deserialization generates SAX events that are passed to a MContentHandler.
See also: Xml::MContentHandler
For deserialization to a DOM tree, see CXmlEngDeserializerDOM.
See also: CXmlEngDeserializerDOM
Support for data stored outside the DOM tree, such as data linked by xop:include references, is provided. The external data must be set with UseExternalDataL() prior to deserialization. The data is then returned through the MContentHandler interface.
IMPORT_C void | DeserializeL | ( | ) | [virtual] |
Deserializes the file or buffer previously set by SetInputFileL() or SetInputBuffer().
The result of deserialization is passed to the content handler as SAX events.
One of the system wide error codes or one of the Xml specific ones defined in XmlFrameworkErrors.h
IMPORT_C void | DeserializeL | ( | const TDesC & | aFileName, |
const TXmlEngParsingOptions & | aOptions = TXmlEngParsingOptions() | |||
) | [virtual] |
Deserializes the given file. Any filename previously set with SetInputFileL() is ignored.
The result of deserialization is passed to the content handler as SAX events.
One of the system wide error codes or one of the Xml specific ones defined in XmlFrameworkErrors.h
Parameter | Description |
---|---|
aFileName | The file to be parsed |
aOptions | Parsing options |
IMPORT_C void | DeserializeL | ( | RFs & | aRFs, |
const TDesC & | aFileName, | |||
const TXmlEngParsingOptions & | aOptions = TXmlEngParsingOptions() | |||
) | [virtual] |
Deserializes the given file. Any filename previously set with SetInputFileL() is ignored.
The result of deserialization is passed to the content handler as SAX events.
One of the system wide error codes or one of the Xml specific ones defined in XmlFrameworkErrors.h
Parameter | Description |
---|---|
aRFs | File Server session |
aFileName | The file to be parsed |
aOptions | Parsing options |
IMPORT_C void | DeserializeL | ( | const TDesC8 & | aBuffer, |
const TXmlEngParsingOptions & | aOptions = TXmlEngParsingOptions() | |||
) | [virtual] |
Deserializes the given buffer. Any buffer previously set with SetInputBuffer() is ignored.
The result of deserialization is passed to the content handler as SAX events.
One of the system wide error codes or one of the Xml specific ones defined in XmlFrameworkErrors.h
Parameter | Description |
---|---|
aBuffer | The buffer to be parsed |
aOptions | Parsing options |
Disables parser features.
See also: Xml::CParser::DisableFeature() Xml::CParser::TParserFeature
Parameter | Description |
---|---|
aParserFeature | The parser feature to disable |
Returns: KErrNone if successful, otherwise one of the system-wide error codes
Enables parser features.
See also: Xml::CParser::EnableFeature() Xml::CParser::TParserFeature
Parameter | Description |
---|---|
aParserFeature | The parser feature to enable |
Returns: KErrNone if successful, otherwise one of the system-wide error codes
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
TXmlEngDataContainer * | GetDataContainer | ( | const TDesC8 & | aCid | ) |
Retrieves a pointer to the data container referenced by CID.
Parameter | Description |
---|---|
aCid | The aCid corresponding to the data container required |
Returns: The data container or NULL if no matching container is found
Checks if a parser feature is enabled.
See also: Xml::CParser::IsFeatureEnabled() Xml::CParser::TParserFeature
Parameter | Description |
---|---|
aParserFeature | The parser feature to check |
Returns: ETrue if feature is enabled, otherwise EFalse
IMPORT_C CXmlEngDeserializer * | NewL | ( | Xml::MContentHandler & | aContentHandler, |
TXmlEngDeserializerType | aType = EDeserializerDefault | |||
) | [static] |
Creates a deserializer of the given type. Returns an instance of this class or a derived class.
One of the system-wide error codes
Parameter | Description |
---|---|
aType | Deserializer type |
Returns: The deserializer
IMPORT_C const TXmlEngParsingOptions & | ParsingOptions | ( | ) | [virtual] |
Gets the parsing options
Returns: The parsing options
IMPORT_C void | SetContentHandlerL | ( | Xml::MContentHandler & | aContentHandler | ) | [virtual] |
Sets the content handler which handles SAX events raised during deserialization. Clients must derive from Xml::MContentHandler in order to receive SAX callbacks.
One of the system-wide error codes
Parameter | Description |
---|---|
aContentHandler | The content handler |
IMPORT_C void | SetInputBuffer | ( | const TDesC8 & | aBuffer | ) |
Sets the input type to buffer and saves the buffer for later deserialization.
Parameter | Description |
---|---|
aBuffer | The buffer to deserialize |
IMPORT_C void | SetInputFileL | ( | const TDesC & | aFileName | ) |
One of the system-wide error codes
Parameter | Description |
---|---|
aFileName | The file name of the file to deserialize |
IMPORT_C void | SetParsingOptions | ( | TXmlEngParsingOptions & | aOptions | ) | [virtual] |
Sets parsing options used for deserialization.
Parameter | Description |
---|---|
aOptions | Parsing options to set. A copy of the options is stored. |
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 |