The element is identified by local name (or qualified name) and namespace. All child elements between start tag and and end tag defined this fragment will become content of this BaseFragment. In other words, BaseFragment has all data inside a single element. BaseFragment will parse only namespace (xmlns) attributes from a document and rest of the attributes are to be handled by subclasses, which should overwrite SetAttributesL() method to achieve this. The CSenFragmentReader class will do the actual parsing and this class will act as content handler for XML parser SAX events.
|
Public Member Functions |
virtual IMPORT_C | ~CSenFragmentBase () |
| Destructor.
|
virtual IMPORT_C void | OnStartElementL (const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnEndElementL (const RTagInfo &aElement, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnStartDocumentL (const RDocumentParameters &aDocParam, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnEndDocumentL (TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnContentL (const TDesC8 &aBytes, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnStartPrefixMappingL (const RString &aPrefix, const RString &aUri, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnEndPrefixMappingL (const RString &aPrefix, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnIgnorableWhiteSpaceL (const TDesC8 &aBytes, TInt ErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnSkippedEntityL (const RString &aName, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnProcessingInstructionL (const TDesC8 &aTarget, const TDesC8 &aData, TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C void | OnError (TInt aErrorCode) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C TAny * | GetExtendedInterface (const TInt32 aUid) |
| Callback function implementing the XML content handler interface.
|
virtual IMPORT_C TPtrC8 | ContentL () |
| Getter for the content,which is returned as UTF-8 form XML.
|
virtual IMPORT_C TXmlEngNamespace | Namespace (const TDesC8 &aPrefix) |
| Gets the namespace object with a given prefix.
|
virtual IMPORT_C void | ResetContentL () |
| Resets the content of the fragment, and resets the namespaces.
|
virtual IMPORT_C TPtrC8 | LocalName () const |
virtual IMPORT_C TPtrC8 | NsUri () const |
| Getter for Fragment's namespace URI.
|
virtual IMPORT_C TPtrC8 | NsPrefix () const |
| Getter for namespace prefix of this fragment.
|
virtual IMPORT_C TXmlEngElement | AsElementL () |
| Returns the current XML element of this fragment.
|
virtual IMPORT_C RSenDocument & | AsDocumentL () |
| Returns the current XML element of this fragment.
|
virtual IMPORT_C TXmlEngElement | ExtractElement () |
| Etracts the XML element from the fragment, leaving the fragment empty.
|
virtual IMPORT_C void | OnDelegateParsingL (CSenFragmentBase &aDelegate) |
| Let the delegate MSenFragment handle the following SAX events.
|
virtual IMPORT_C void | OnDelegateParsingL (const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode) |
| Creates a new fragment and lets the created MSenFragment handle the following SAX events.
|
virtual IMPORT_C void | SetOwner (CSenFragmentBase &aFragment) |
| Sets a new parent for this fragment.
|
virtual IMPORT_C void | OnResumeParsingFromL (const RTagInfo &aElement, TInt aErrorCode) |
| Leave codes: Resumes parsing to be handled by this fragment.
|
IMPORT_C void | OnWriteStartElementL (const RTagInfo &aElement, const RAttributeArray &aAttributes) |
| Writes the start element tag to the content stream.
|
IMPORT_C void | OnWriteEndElementL (const RTagInfo &aElement) |
| Writes the end element tag to the content stream.
|
virtual IMPORT_C HBufC * | AsXmlUnicodeL () |
| Gets the fragment data as an unicode XML.
|
virtual IMPORT_C HBufC8 * | AsXmlL () |
| Gets the fragment data as an UTF-8 form XML.
|
virtual IMPORT_C void | WriteAsXMLToL (RWriteStream &aWs) |
| Invokes AsElement().WriteAsXMLToL(aWs);.
|
virtual IMPORT_C TBool | ConsistsOfL (CSenFragmentBase &aCandidate) |
| Checks if fragment matches to another fragment by its content and child elements.
|
IMPORT_C void | SetContentHandler (CSenFragmentBase &aContentHandler) |
IMPORT_C void | SetDocument (RSenDocument &aDocument) |
| Sets the RSenDocument.
|
Static Public Member Functions |
static IMPORT_C CSenFragmentBase * | NewL (const TXmlEngElement &aElement) |
| Standard 2 phase constructor.
|
static IMPORT_C CSenFragmentBase * | NewL (const TDesC8 &aLocalName) |
| Standard 2 phase constructor.
|
static IMPORT_C CSenFragmentBase * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
| Standard 2 phase constructor.
|
static IMPORT_C CSenFragmentBase * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix) |
| Standard 2 phase constructor.
|
static IMPORT_C CSenFragmentBase * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &apAttrs) |
| Standard 2 phase constructor.
|
static IMPORT_C CSenFragmentBase * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &apAttrs, TXmlEngElement &aParent) |
| Standard 2 phase constructor.
|
static IMPORT_C CSenFragmentBase * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &apAttrs, TXmlEngElement &aParent, RSenDocument &aOwnerDocument) |
| Standard 2 phase constructor.
|
static IMPORT_C CSenFragmentBase * | NewL (TXmlEngElement &aRootElement, RSenDocument &aOwnerDocument) |
| Standard 2 phase constructor.
|
Protected Member Functions |
IMPORT_C | CSenFragmentBase () |
| C++ default constructor.
|
IMPORT_C void | BaseConstructL (const TXmlEngElement &aSrc) |
| BaseConstructL, where an element is given as initializer.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aLocalName) |
| BaseConstructL setting XML localname for this fragment.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
| BaseConstructL offering possibility to set XML namespace and localname.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix) |
| Base constructor.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &aAttrs) |
| Base constructor.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &aAttrs, TXmlEngElement &aParent) |
| Base constructor.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aPrefix, const RAttributeArray &aAttrs, TXmlEngElement &aParent, RSenDocument &aOwnerDocument) |
| Base constructor.
|
IMPORT_C void | BaseConstructL (TXmlEngElement &aRootElement, RSenDocument &aOwnerDocument) |
| Base constructor.
|
virtual IMPORT_C void | AddAttributesL (const RAttributeArray &apAttrs) |
| Adds new XML attributes to this fragment.
|
virtual IMPORT_C void | AddAttributesToElementL (TXmlEngElement element, const RAttributeArray &apAttrs) |
| Adds new XML attributes to specified element.
|
void | RenameL (const TDesC8 &aLocalName, const TDesC8 &aPrefix, const TDesC8 &aNamespace) |
| Method renames the XML properties of this fragment.
|
void | RenameL (const TDesC8 &aLocalName, const TDesC8 &aNamespace) |
| Method renames the XML properties of this fragment.
|
void | RenameLocalNameL (const TDesC8 &aLocalName) |
| Renames local name for this XML fragment.
|
void | RenameNamespaceL (const TDesC8 &aNamespace) |
| Renames namespace URI for this XML fragment.
|
void | RenamePrefixL (const TDesC8 &aPrefix) |
| Renames namespace prefix for this XML fragment.
|
void | RenameNamespaceL (const TDesC8 &aPrefix, const TDesC8 &aNamespace) |
| Renames namespace prefix and namespace URI for this XML fragment.
|
IMPORT_C TXmlEngElement | SetContentOfL (const TDesC8 &aLocalName, const TDesC8 &aContent) |
| Sets content to a child element.
|
IMPORT_C TPtrC8 | ContentOf (const TDesC8 &aLocalName) |
| Gets the content of a given element.
|
virtual IMPORT_C TBool | ConsistsOfL (TXmlEngElement &aElement, TXmlEngElement &aCandidate) |
virtual IMPORT_C void | AddNamespacesL () |
| Adds namespaces from internal array for the fragment.
|
virtual IMPORT_C void | SetContentL (const TDesC8 &aContent) |
| Sets content to a child element.
|
virtual IMPORT_C void | AddContentL (const TDesC8 &aContent) |
| Adds the content.
|
IMPORT_C void | StartSavingContent () |
| StartSavingContent changes the internal SAX parsing state of this fragment to KSenStateSave, which means that next call to OnStartElementL is treated as data, and not ignored (in DOM fragment implementation, it would be "extended" into a DOM object).
|
Protected Attributes |
TInt | iState |
TXmlEngElement | iElement |
RSenDocument | iDocument |
CSenParser * | ipParser |
CSenFragmentBase * | ipOwner |
CSenFragmentBase * | ipDelegate |
RPointerArray< CSenNamespaceData > * | ipNamespaceArray |
CBufFlat * | ipContentBuf |
RBufWriteStream * | ipContentWriteStream |
Friends |
class | CSenParserImpl |