Link against: senfragment.lib
#include <SenFragmentBase.h>
Inherited by CSenCredential2, CSenDomFragmentBase, CSenSoapEnvelope2, and CSenWsSecurityHeader2.
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 |
|
Destructor. |
|
C++ default constructor. |
|
Adds new XML attributes to this fragment. Can be overridden to replace old attributes.
Reimplemented in CSenDomFragmentBase. |
|
Adds new XML attributes to specified element. Can be overridden to replace old attributes.
|
|
Adds the content.
|
|
Adds namespaces from internal array for the fragment.
Reimplemented in CSenDomFragmentBase. |
|
Returns the current XML element of this fragment. If element has not been set, this method will initialize new, un-initialized element. Method leaves with if there is not enough memory (OOM)
Reimplemented in CSenDomFragmentBase. |
|
Returns the current XML element of this fragment. If element has not been set, this method will initialize new, un-initialized element. Method leaves with if there is not enough memory (OOM)
Reimplemented in CSenDomFragmentBase. |
|
Gets the fragment data as an UTF-8 form XML.
Reimplemented in CSenDomFragmentBase. |
|
Gets the fragment data as an unicode XML.
Reimplemented in CSenDomFragmentBase. |
|
Base constructor.
|
|
Base constructor.
Reimplemented in CSenCredential2, and CSenDomFragmentBase. |
|
Base constructor.
Reimplemented in CSenCredential2, and CSenDomFragmentBase. |
|
Base constructor.
Reimplemented in CSenCredential2, and CSenDomFragmentBase. |
|
Base constructor.
Reimplemented in CSenDomFragmentBase. |
|
BaseConstructL offering possibility to set XML namespace and localname.
Reimplemented in CSenDomFragmentBase. |
|
BaseConstructL setting XML localname for this fragment.
Reimplemented in CSenDomFragmentBase. |
|
BaseConstructL, where an element is given as initializer.
Reimplemented in CSenDomFragmentBase. |
|
Reimplemented in CSenDomFragmentBase. |
|
Checks if fragment matches to another fragment by its content and child elements. Fragment can contain more data than the given candidate.
Reimplemented in CSenDomFragmentBase. |
|
Getter for the content,which is returned as UTF-8 form XML.
Reimplemented in CSenDomFragmentBase. |
|
Gets the content of a given element.
Reimplemented in CSenDomFragmentBase. |
|
Etracts the XML element from the fragment, leaving the fragment empty. Note(!): the return value (CSenElement) STRONGLY suggests that subclasses INHERIT CSenFragment in order properly comply the requirement of the ExtractElement() implementation.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Reimplemented in CSenDomFragmentBase. |
|
Gets the namespace object with a given prefix.
Reimplemented in CSenDomFragmentBase. |
|
Standard 2 phase constructor.
Reimplemented in CSenSoapFault2. |
|
Standard 2 phase constructor.
Reimplemented in CSenCredential2, CSenDomFragmentBase, and CSenSoapFault2. |
|
Standard 2 phase constructor.
Reimplemented in CSenCredential2, and CSenDomFragmentBase. |
|
Standard 2 phase constructor.
Reimplemented in CSenCredential2, and CSenDomFragmentBase. |
|
Standard 2 phase constructor.
Reimplemented in CSenDomFragmentBase. |
|
Standard 2 phase constructor.
Reimplemented in CSenDomFragmentBase. |
|
Standard 2 phase constructor.
Reimplemented in CSenDomFragmentBase. |
|
Standard 2 phase constructor.
Reimplemented in CSenDomFragmentBase. |
|
Getter for namespace prefix of this fragment.
Reimplemented in CSenDomFragmentBase. |
|
Getter for Fragment's namespace URI.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Creates a new fragment and lets the created MSenFragment handle the following SAX events. This fragment is made the owner of the delegate and the delegate is expected to make this MSenFragment act as receiver for SAX events (callbacks) once it has seen the end element for itself.
Reimplemented in CSenDomFragmentBase. |
|
Let the delegate MSenFragment handle the following SAX events. This fragment is made the owner of the delegate and the delegate is expected to make this MSenFragment the receiver of SAX events once it has seen the end element for itself.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase, and CSenSoapEnvelope2. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Leave codes: Resumes parsing to be handled by this fragment. Usually called by some delegate fragment which was set to be content handler because this fragment called DelegateParsingL().
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenCredential2, CSenDomFragmentBase, and CSenSoapEnvelope2. |
|
Callback function implementing the XML content handler interface. Inheriting classes can override these.
Reimplemented in CSenDomFragmentBase. |
|
Writes the end element tag to the content stream. Derivants can override the basic usage used in BaseFragment.
Reimplemented in CSenDomFragmentBase. |
|
Writes the start element tag to the content stream. Derivants can override the basic usage used in BaseFragment.
Reimplemented in CSenDomFragmentBase. |
|
Method renames the XML properties of this fragment.
Reimplemented in CSenDomFragmentBase. |
|
Method renames the XML properties of this fragment.
Reimplemented in CSenDomFragmentBase. |
|
Renames local name for this XML fragment.
Reimplemented in CSenDomFragmentBase. |
|
Renames namespace prefix and namespace URI for this XML fragment.
Reimplemented in CSenDomFragmentBase. |
|
Renames namespace URI for this XML fragment.
Reimplemented in CSenDomFragmentBase. |
|
Renames namespace prefix for this XML fragment.
Reimplemented in CSenDomFragmentBase. |
|
Resets the content of the fragment, and resets the namespaces.
Reimplemented in CSenDomFragmentBase. |
|
Reimplemented in CSenDomFragmentBase. |
|
Sets content to a child element. If no element with given local name is not found, new one is added and content is set to that one.
|
|
Sets content to a child element. If no element with given local name is not found, new one is added and content is set to that one.
Reimplemented in CSenDomFragmentBase. |
|
Sets the RSenDocument.
|
|
Sets a new parent for this fragment.
Reimplemented in CSenDomFragmentBase. |
|
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). |
|
Invokes AsElement().WriteAsXMLToL(aWs);.
Reimplemented in CSenDomFragmentBase. |
|
|
|
|
|
|
|
|
|
|