CMDXMLEntityConverter Class Reference

class CMDXMLEntityConverter : public CBase

This class represents a generic entity converter for an XML parser or composer. It is responsible for converting entity references to text and vice-versa.

Inherits from

  • CMDXMLEntityConverter

Constructor & Destructor Documentation

CMDXMLEntityConverter()

IMPORT_CCMDXMLEntityConverter()

Constructor

~CMDXMLEntityConverter()

IMPORT_C~CMDXMLEntityConverter()[virtual]

Destructor.

Member Functions Documentation

ConvertEntityRefL(TDes &)

TInt ConvertEntityRefL(TDes &aTextToConvert)[private]

Replaces the built in entity reference with its replacement text.

Parameters

TDes & aTextToConvertAn entity reference to convert. This should begin with & and end with ;.

DTDEntityToText(TDes &)

TInt DTDEntityToText(TDes &aTextToConvert)[protected, virtual]

DTD Specific entity to text converter Takes a block of text and converts any entity references found to the appropriate text. We hope that this can happen in-situ.

Parameters

TDes & aTextToConvertText to be converted - replacement text goes out in the same

EntityToTextL(TDes &)

TInt EntityToTextL(TDes &aTextToConvert)

Takes a block of text and converts any entity references found to the appropriate text. Because built-in and character entity references are longer than the replacement text, this takes place in-situ.

Parameters

TDes & aTextToConvertText to be converted - replacement text goes out in the same

OutputComposedTextL(CMDXMLComposer *, const TDesC &)

IMPORT_C TIntOutputComposedTextL(CMDXMLComposer *aComposer,
const TDesC &aTextToConvert
)[virtual]
Outputs a block of text to a composer with offending characters replaced by entity references.
leave
can Leave due to OOM

Parameters

CMDXMLComposer * aComposerthe composer to be used for output
const TDesC & aTextToConvertThe text to be converted.