CSenXmlElement Class Reference

class CSenXmlElement : public CSenElement
Implementation of an XML element functionality Content is stored in UTF-8 form XML. Note, that setting any 8-bit content into XML without encoding it into form of legal is illegal. Instead, one should use encoding methods, like ones introduced in SenXmlUtils class to encode basic entities, or use use some other encoding like MD5 for binary data content. SenXML.dll
Since
Series60 3.1

Inherits from

Public Member Functions
~CSenXmlElement ()
IMPORT_C void AddAttrL (const TDesC8 &, const TDesC8 &)
IMPORT_C void AddAttributesL (const RAttributeArray &)
IMPORT_C CSenElement & AddElementL ( CSenElement &)
IMPORT_C CSenElement & AddElementL (const TDesC8 &, const TDesC8 &)
IMPORT_C CSenElement & AddElementL (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C CSenElement & AddElementL (const TDesC8 &)
IMPORT_C const CSenNamespace * AddNamespaceL ( CSenNamespace &, TBool )
IMPORT_C const CSenNamespace * AddNamespaceL (const TDesC8 &, const TDesC8 &)
IMPORT_C MSenElement * AsElement ()
IMPORT_C HBufC8 * AsXmlL ()
IMPORT_C HBufC * AsXmlUnicodeL ()
IMPORT_C const TDesC8 * AttrValue (const TDesC8 &)
IMPORT_C RPointerArray < CSenBaseAttribute > & AttributesL ()
IMPORT_C CSenElement * Child ( TInt )
void Compress ()
IMPORT_C TBool ConsistsOfL ( MSenElement &)
IMPORT_C TPtrC8 Content ()
IMPORT_C HBufC * ContentUnicodeL ()
IMPORT_C RWriteStream & ContentWriteStreamL ()
IMPORT_C void CopyFromL ( CSenElement &)
IMPORT_C CSenElement * CreateElementL (const TDesC8 &, const TDesC8 &)
IMPORT_C CSenElement * DetachL ()
IMPORT_C CSenElement * Element (const TDesC8 &)
IMPORT_C CSenElement * Element (const TDesC8 &, const TDesC8 &)
IMPORT_C TInt ElementsL ( RPointerArray < CSenElement > &, const TDesC8 &, const TDesC8 &)
IMPORT_C TInt ElementsL ( RPointerArray < CSenElement > &, const TDesC8 &)
IMPORT_C RPointerArray < CSenElement > & ElementsL ()
IMPORT_C TBool HasContent ()
IMPORT_C CSenElement & InsertElementL ( CSenElement &, const CSenElement &)
IMPORT_C const TDesC8 & LocalName ()
IMPORT_C const CSenNamespace * Namespace ()
IMPORT_C const CSenNamespace * Namespace (const TDesC8 &)
IMPORT_C const CSenNamespace * Namespace (const TDesC8 &, const TBool )
IMPORT_C const CSenNamespace * Namespace (const TDesC8 &, const TDesC8 &)
IMPORT_C const TDesC8 & NamespaceURI ()
IMPORT_C RPointerArray < CSenNamespace > & NamespacesL ()
IMPORT_C CSenXmlElement * NewL (const TDesC8 &)
IMPORT_C CSenXmlElement * NewL (const TDesC8 &, const TDesC8 &)
IMPORT_C CSenXmlElement * NewL (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C CSenXmlElement * NewL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)
IMPORT_C CSenXmlElement * NewL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, CSenElement &)
IMPORT_C const TDesC8 & NsPrefix ()
IMPORT_C CSenElement * Parent ()
IMPORT_C CSenElement * RemoveElement ( CSenElement &)
IMPORT_C CSenElement * RemoveElement (const TDesC8 &, const TDesC8 &)
IMPORT_C CSenElement * RemoveElement (const TDesC8 &)
IMPORT_C CSenElement * ReplaceElementL ( CSenElement &)
IMPORT_C MSenElement & Root ()
IMPORT_C void Set (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void SetAttributesL (const RAttributeArray &)
IMPORT_C TPtrC8 SetContentL (const TDesC8 &)
IMPORT_C void SetNamespaceL (const TDesC8 &)
IMPORT_C void SetNamespaceL (const TDesC8 &, const TDesC8 &)
IMPORT_C CSenElement * SetParent ( CSenElement *)
IMPORT_C void SetPrefixL (const TDesC8 &)
IMPORT_C void WriteAsXMLToL ( RWriteStream &)
IMPORT_C void WriteNamespacesToL ( RWriteStream &)
Protected Member Functions
CSenXmlElement ()
IMPORT_C const TDesC8 & AddAttributeL (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C const TDesC8 & AddAttributeL (const TDesC8 &, const TDesC8 &)
IMPORT_C const TDesC8 & AddAttributeL ( CSenBaseAttribute *)
IMPORT_C void AllocContentBufL ()
IMPORT_C void BaseConstructL (const TDesC8 &)
IMPORT_C void BaseConstructL (const TDesC8 &, const TDesC8 &)
IMPORT_C void BaseConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void BaseConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)
IMPORT_C void BaseConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, CSenElement &)
IMPORT_C CSenBaseAttribute * FindAttr (const TDesC8 &)
IMPORT_C TInt IndexOfElement (const TDesC8 &, const TDesC8 &)
IMPORT_C void WriteAttrToL ( RWriteStream &, const TDesC8 &, const TDesC8 &)
IMPORT_C void WriteAttrsToL ( RWriteStream &)
IMPORT_C void WriteContentToL ( RWriteStream &)
IMPORT_C void WriteElementsToL ( RWriteStream &)
IMPORT_C TPtrC8 WriteToBufL ( CBufBase &)
Private Member Functions
void AddNamespaceMissingFromL ( RPointerArray < CSenNamespace > &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
RPointerArray < CSenBaseAttribute > * ipAttrs
CBufFlat * ipContentBuf
RBufWriteStream * ipContentWriteStream
RPointerArray < CSenElement > * ipElements
HBufC8 * ipLocalName
CSenNamespace * ipNamespace
RPointerArray < CSenNamespace > * ipNamespaces
CSenElement * ipParent

Constructor & Destructor Documentation

CSenXmlElement()

IMPORT_C CSenXmlElement ( ) [protected]

C++ default constructor.

~CSenXmlElement()

IMPORT_C ~CSenXmlElement ( ) [virtual]

Destructor.

Member Functions Documentation

AddAttrL(const TDesC8 &, const TDesC8 &)

IMPORT_C void AddAttrL ( const TDesC8 & aName,
const TDesC8 & aValue
) [virtual]

Adds an attribute. If attribute is already existing, the value of the attribute will be replaced.

Parameters

const TDesC8 & aName
const TDesC8 & aValue

AddAttributeL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C const TDesC8 & AddAttributeL ( const TDesC8 & aQName,
const TDesC8 & aLocalName,
const TDesC8 & aValue
) [protected, virtual]

Adds an attribute into this element. Used also adding new namespaces into the element.

Parameters

const TDesC8 & aQName Attribute's qualified name
const TDesC8 & aLocalName Attribute's local name
const TDesC8 & aValue Attribute's value

AddAttributeL(const TDesC8 &, const TDesC8 &)

IMPORT_C const TDesC8 & AddAttributeL ( const TDesC8 & aAttrName,
const TDesC8 & aValue
) [protected, virtual]

Adds an attribute into this element. Used also adding new namespaces into the element.

Parameters

const TDesC8 & aAttrName
const TDesC8 & aValue Attribute's value

AddAttributeL(CSenBaseAttribute *)

IMPORT_C const TDesC8 & AddAttributeL ( CSenBaseAttribute * apAttribute ) [protected]

Adds an attribute into this element.

Parameters

CSenBaseAttribute * apAttribute Attribute to be added. Ownership is transferred to this element.

AddAttributesL(const RAttributeArray &)

IMPORT_C void AddAttributesL ( const RAttributeArray & apAttrs ) [virtual]

Adds new attributes to the element.

Parameters

const RAttributeArray & apAttrs

AddElementL(CSenElement &)

IMPORT_C CSenElement & AddElementL ( CSenElement & aElement ) [virtual]

Adds an Element to the children elements. Sets this element to be the new parent of the given element.

Parameters

CSenElement & aElement

AddElementL(const TDesC8 &, const TDesC8 &)

IMPORT_C CSenElement & AddElementL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName
) [virtual]

Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName

AddElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C CSenElement & AddElementL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName
) [virtual]

Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName
const TDesC8 & aQName

AddElementL(const TDesC8 &)

IMPORT_C CSenElement & AddElementL ( const TDesC8 & aLocalName ) [virtual]

Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element. Note: Element is created with no specific namespace, default namespace of some of the upper level elements are in effect if there is such a namespace.

Parameters

const TDesC8 & aLocalName

AddNamespaceL(CSenNamespace &, TBool)

IMPORT_C const CSenNamespace * AddNamespaceL ( CSenNamespace & aNewNamespace,
TBool aCheckInParent
) [virtual]

Adds a namespace declaration. If this element (or its parent if parameter aCheckInParent is ETrue) already has a Namespace with the same prefix and URI the given Namespace is not added.

Parameters

CSenNamespace & aNewNamespace
TBool aCheckInParent

AddNamespaceL(const TDesC8 &, const TDesC8 &)

IMPORT_C const CSenNamespace * AddNamespaceL ( const TDesC8 & aPrefix,
const TDesC8 & aUri
) [virtual]

Method for adding a namespace for the Element.

Parameters

const TDesC8 & aPrefix
const TDesC8 & aUri

AddNamespaceMissingFromL(RPointerArray< CSenNamespace > &)

void AddNamespaceMissingFromL ( RPointerArray < CSenNamespace > & aNamespaces ) [private]

Parameters

RPointerArray < CSenNamespace > & aNamespaces

AllocContentBufL()

IMPORT_C void AllocContentBufL ( ) [protected, virtual]

Allocates a new buffer for saving content, if none allocated yet.

AsElement()

IMPORT_C MSenElement * AsElement ( ) [virtual]

Gets the current element as XML element. Mostly used to get the classes which implement this interface as an instance of this interface.

AsXmlL()

IMPORT_C HBufC8 * AsXmlL ( ) [virtual]

Gets the element as an XML buffer. Buffer will contain all the childs

AsXmlUnicodeL()

IMPORT_C HBufC * AsXmlUnicodeL ( ) [virtual]

Gets the element as an unicode XML buffer. Buffer will contain all the childs etc.

AttrValue(const TDesC8 &)

IMPORT_C const TDesC8 * AttrValue ( const TDesC8 & aName ) [virtual]

Gets the value of the given attribute.

Parameters

const TDesC8 & aName

AttributesL()

IMPORT_C RPointerArray < CSenBaseAttribute > & AttributesL ( ) [virtual]

Gets all the attributes of this element in an array.

BaseConstructL(const TDesC8 &)

IMPORT_C void BaseConstructL ( const TDesC8 & aLocalName ) [protected]

Following BaseConstructL methods should be called from the deriving classes ConstructL() methods. Parameter info is found in the corresponding NewL-methods.

Parameters

const TDesC8 & aLocalName

BaseConstructL(const TDesC8 &, const TDesC8 &)

IMPORT_C void BaseConstructL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName
) [protected]

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName

BaseConstructL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C void BaseConstructL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName
) [protected]

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName
const TDesC8 & aQName

BaseConstructL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)

IMPORT_C void BaseConstructL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName,
const RAttributeArray & apAttrs
) [protected]

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName
const TDesC8 & aQName
const RAttributeArray & apAttrs

BaseConstructL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, CSenElement &)

IMPORT_C void BaseConstructL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName,
const RAttributeArray & apAttrs,
CSenElement & aParent
) [protected]

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName
const TDesC8 & aQName
const RAttributeArray & apAttrs
CSenElement & aParent

Child(TInt)

IMPORT_C CSenElement * Child ( TInt aIndex ) [virtual]

Gets a child element from a specified index.

Parameters

TInt aIndex

Compress()

void Compress ( )

ConsistsOfL(MSenElement &)

IMPORT_C TBool ConsistsOfL ( MSenElement & aCandidate ) [virtual]
Checks if element matches to another element by its content and child elements. Element can contain more data than the given pattern.
Since
Series60 3.0

Parameters

MSenElement & aCandidate The pattern to be matched. Must contain same or less data for match to come true.

Content()

IMPORT_C TPtrC8 Content ( ) const [virtual]

Getter for the content of the element.

ContentUnicodeL()

IMPORT_C HBufC * ContentUnicodeL ( ) const [virtual]

Getter for the content of the element, unicode version.

ContentWriteStreamL()

IMPORT_C RWriteStream & ContentWriteStreamL ( ) [virtual]

Gets the write stream for the content for easy appending. Writing 8-bit (UTF-8) string to the returned stream will be appended to the content.

CopyFromL(CSenElement &)

IMPORT_C void CopyFromL ( CSenElement & aSource ) [virtual]

Copies content from given element to this element appending to the existing content if there is any.

Parameters

CSenElement & aSource

CreateElementL(const TDesC8 &, const TDesC8 &)

IMPORT_C CSenElement * CreateElementL ( const TDesC8 & aNsPrefix,
const TDesC8 & aLocalName
) [virtual]

Create a new element ready for adding or insertion. If the given namespace prefix is not declared yet the element will not be created and NULL will be returned.

Parameters

const TDesC8 & aNsPrefix
const TDesC8 & aLocalName

DetachL()

IMPORT_C CSenElement * DetachL ( ) [virtual]

Detach the element from its parent. If the element, or one of its children, is dependent on a namespace declared in the scope of the parent copy those namespace declarations to this element.

Element(const TDesC8 &)

IMPORT_C CSenElement * Element ( const TDesC8 & aLocalName ) [virtual]

Gets the child element with the specified local name. Assumes that namespace is the same as this parent element.

Parameters

const TDesC8 & aLocalName

Element(const TDesC8 &, const TDesC8 &)

IMPORT_C CSenElement * Element ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName
) [virtual]

Gets the child element with the specified local name and namespace URI.

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName

ElementsL(RPointerArray< CSenElement > &, const TDesC8 &, const TDesC8 &)

IMPORT_C TInt ElementsL ( RPointerArray < CSenElement > & aElementArray,
const TDesC8 & aNsUri,
const TDesC8 & aLocalName
) [virtual]

Getting the child elements of this element matching the given criteria.

Parameters

RPointerArray < CSenElement > & aElementArray
const TDesC8 & aNsUri
const TDesC8 & aLocalName

ElementsL(RPointerArray< CSenElement > &, const TDesC8 &)

IMPORT_C TInt ElementsL ( RPointerArray < CSenElement > & aElementArray,
const TDesC8 & aLocalName
) [virtual]

Getting the child elements of this element matching the given criteria.

Parameters

RPointerArray < CSenElement > & aElementArray
const TDesC8 & aLocalName

ElementsL()

IMPORT_C RPointerArray < CSenElement > & ElementsL ( ) [virtual]

Getting the child elements of this element.

FindAttr(const TDesC8 &)

IMPORT_C CSenBaseAttribute * FindAttr ( const TDesC8 & aName ) [protected, virtual]

Method for finding an attribute with given name.

Parameters

const TDesC8 & aName a name of the attribute to be searched for

HasContent()

IMPORT_C TBool HasContent ( ) const [virtual]

Method for checking if the element has any content within.

IndexOfElement(const TDesC8 &, const TDesC8 &)

IMPORT_C TInt IndexOfElement ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName
) const [protected, virtual]

Method for finding index for a wanted element.

Parameters

const TDesC8 & aNsUri a namespace URI which needs to match
const TDesC8 & aLocalName a local name which needs to match

InsertElementL(CSenElement &, const CSenElement &)

IMPORT_C CSenElement & InsertElementL ( CSenElement & aElement,
const CSenElement & aBeforeElement
) [virtual]

Insert an Element into the list of children elements so that the inserted Element is placed right before the aBeforeElement. If aBeforeElement is not found, element will be appended to the last position. Function leaves if error occurs in inserting.

Parameters

CSenElement & aElement
const CSenElement & aBeforeElement

LocalName()

IMPORT_C const TDesC8 & LocalName ( ) const [virtual]

Getter for Element's local name.

Namespace()

IMPORT_C const CSenNamespace * Namespace ( ) [virtual]

Getter for Element's namespace.

Namespace(const TDesC8 &)

IMPORT_C const CSenNamespace * Namespace ( const TDesC8 & aNsPrefix ) [virtual]

Getter for new namespace, using a namespace prefix as a search criteria.

Parameters

const TDesC8 & aNsPrefix is the new namespace prefix for this element

Namespace(const TDesC8 &, const TBool)

IMPORT_C const CSenNamespace * Namespace ( const TDesC8 & aNsPrefix,
const TBool aCheckInParent
) [virtual]

Getter for new namespace, using a namespace prefix as a search criteria, supporting both normal and recursive search mode (checking the parent).

Parameters

const TDesC8 & aNsPrefix
const TBool aCheckInParent

Namespace(const TDesC8 &, const TDesC8 &)

IMPORT_C const CSenNamespace * Namespace ( const TDesC8 & aNsPrefix,
const TDesC8 & aUri
) [virtual]

Getter for new namespace, using both namespace prefix and namespace URI as search criteria.

Parameters

const TDesC8 & aNsPrefix
const TDesC8 & aUri

NamespaceURI()

IMPORT_C const TDesC8 & NamespaceURI ( ) const [virtual]

Getter for Element's namespace URI.

NamespacesL()

IMPORT_C RPointerArray < CSenNamespace > & NamespacesL ( ) [virtual]

Gets all the namespaces of this element in an array.

NewL(const TDesC8 &)

IMPORT_C CSenXmlElement * NewL ( const TDesC8 & aLocalName ) [static]

Standard constructor.

Parameters

const TDesC8 & aLocalName the local name for this element. Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.

NewL(const TDesC8 &, const TDesC8 &)

IMPORT_C CSenXmlElement * NewL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName
) [static]

Standard constructor.

Parameters

const TDesC8 & aNsUri the namespace URI for this element.
const TDesC8 & aLocalName the local name for this element. Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.

NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C CSenXmlElement * NewL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName
) [static]

Standard constructor.

Parameters

const TDesC8 & aNsUri the namespace URI for this element.
const TDesC8 & aLocalName the local name for this element.
const TDesC8 & aQName the qualified name for this element. Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.

NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)

IMPORT_C CSenXmlElement * NewL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName,
const RAttributeArray & apAttrs
) [static]

Standard constructor.

Parameters

const TDesC8 & aNsUri the namespace URI for this element.
const TDesC8 & aLocalName the local name for this element.
const TDesC8 & aQName the qualified name for this element.
const RAttributeArray & apAttrs the attributes for this element. Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.

NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, CSenElement &)

IMPORT_C CSenXmlElement * NewL ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName,
const RAttributeArray & apAttrs,
CSenElement & aParent
) [static]

Standard constructor.

Parameters

const TDesC8 & aNsUri the namespace URI for this element.
const TDesC8 & aLocalName the local name for this element.
const TDesC8 & aQName the qualified name for this element.
const RAttributeArray & apAttrs the attributes for this element.
CSenElement & aParent

NsPrefix()

IMPORT_C const TDesC8 & NsPrefix ( ) const [virtual]

Getter for namespace prefix of this element.

Parent()

IMPORT_C CSenElement * Parent ( ) [virtual]

Gets the parent element of this element.

RemoveElement(CSenElement &)

IMPORT_C CSenElement * RemoveElement ( CSenElement & aElement ) [virtual]

Remove an element from the childs.

Parameters

CSenElement & aElement

RemoveElement(const TDesC8 &, const TDesC8 &)

IMPORT_C CSenElement * RemoveElement ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName
) [virtual]

Remove an element from the childs.

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName

RemoveElement(const TDesC8 &)

IMPORT_C CSenElement * RemoveElement ( const TDesC8 & aLocalName ) [virtual]

Remove an element from the childs.

Parameters

const TDesC8 & aLocalName

ReplaceElementL(CSenElement &)

IMPORT_C CSenElement * ReplaceElementL ( CSenElement & aElement ) [virtual]

Replaces an element from the childs with another element. Element's local name and namespace URI will be used to match the element to be replaced. If matching element is not found, will normally add the given element to the childs.

Parameters

CSenElement & aElement

Root()

IMPORT_C MSenElement & Root ( ) [virtual]

Gets the root element. If no parent element, returns this element.

Set(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C void Set ( const TDesC8 & aNsUri,
const TDesC8 & aLocalName,
const TDesC8 & aQName
) [virtual]

(Re-) Set the name and namespace of this Element. The element will be given the localName in the the given namespace. A prefix will be computed from the qualified name. This method should be used with care and is mainly intended for protected use in implementations.

Parameters

const TDesC8 & aNsUri
const TDesC8 & aLocalName
const TDesC8 & aQName

SetAttributesL(const RAttributeArray &)

IMPORT_C void SetAttributesL ( const RAttributeArray & apAttrs ) [virtual]

Adds attributes to the element. Calls internally AddAttributesL() Can be overridden to replace old attributes.

Parameters

const RAttributeArray & apAttrs

SetContentL(const TDesC8 &)

IMPORT_C TPtrC8 SetContentL ( const TDesC8 & aContent ) [virtual]

Sets the content to the element. Old content is overwritten.

Parameters

const TDesC8 & aContent

SetNamespaceL(const TDesC8 &)

IMPORT_C void SetNamespaceL ( const TDesC8 & aNsUri ) [virtual]

Setter for Element's namespace URI.

Parameters

const TDesC8 & aNsUri

SetNamespaceL(const TDesC8 &, const TDesC8 &)

IMPORT_C void SetNamespaceL ( const TDesC8 & aNsPrefix,
const TDesC8 & aNsUri
) [virtual]

Setter for Element's namespace URI.

Parameters

const TDesC8 & aNsPrefix
const TDesC8 & aNsUri

SetParent(CSenElement *)

IMPORT_C CSenElement * SetParent ( CSenElement * apParent ) [virtual]

Sets the parent element to this element. Notice that the element is not automatically added as a child of the parent. Parent's AddElementL() should be called instead.

Parameters

CSenElement * apParent

SetPrefixL(const TDesC8 &)

IMPORT_C void SetPrefixL ( const TDesC8 & aPrefix ) [virtual]

Setter for namespace prefix of this element.

Parameters

const TDesC8 & aPrefix

WriteAsXMLToL(RWriteStream &)

IMPORT_C void WriteAsXMLToL ( RWriteStream & aWriteStream ) [virtual]

Element writes itself to a write stream using UTF-8 charset encoding.

Parameters

RWriteStream & aWriteStream

WriteAttrToL(RWriteStream &, const TDesC8 &, const TDesC8 &)

IMPORT_C void WriteAttrToL ( RWriteStream & aWriteStream,
const TDesC8 & aName,
const TDesC8 & aValue
) [protected, virtual]

Helper function to write an attribute into a writestream.

Parameters

RWriteStream & aWriteStream writestream to write into
const TDesC8 & aName attribute name
const TDesC8 & aValue attribute value

WriteAttrsToL(RWriteStream &)

IMPORT_C void WriteAttrsToL ( RWriteStream & aWriteStream ) [protected, virtual]

Writes element's attributes into a writestream.

Parameters

RWriteStream & aWriteStream writestream to write into

WriteContentToL(RWriteStream &)

IMPORT_C void WriteContentToL ( RWriteStream & aWriteStream ) [protected, virtual]

Writes all element's content into a writestream.

Parameters

RWriteStream & aWriteStream writestream to write into

WriteElementsToL(RWriteStream &)

IMPORT_C void WriteElementsToL ( RWriteStream & aWriteStream ) [protected, virtual]

Writes all internal elements into a writestream.

Parameters

RWriteStream & aWriteStream writestream to write into

WriteNamespacesToL(RWriteStream &)

IMPORT_C void WriteNamespacesToL ( RWriteStream & aWriteStream ) [virtual]

Element writes its namespaces to a write stream using UTF-8 charset encoding.

Parameters

RWriteStream & aWriteStream

WriteToBufL(CBufBase &)

IMPORT_C TPtrC8 WriteToBufL ( CBufBase & aBuf ) [protected, virtual]

Writes element into a dynamic buffer.

Parameters

CBufBase & aBuf a dynamic buffer where to append everything.

Member Data Documentation

RPointerArray< CSenBaseAttribute > * ipAttrs

RPointerArray < CSenBaseAttribute > * ipAttrs [private]

CBufFlat * ipContentBuf

CBufFlat * ipContentBuf [private]

RBufWriteStream * ipContentWriteStream

RBufWriteStream * ipContentWriteStream [private]

RPointerArray< CSenElement > * ipElements

RPointerArray < CSenElement > * ipElements [private]

HBufC8 * ipLocalName

HBufC8 * ipLocalName [private]

CSenNamespace * ipNamespace

CSenNamespace * ipNamespace [private]

RPointerArray< CSenNamespace > * ipNamespaces

RPointerArray < CSenNamespace > * ipNamespaces [private]

CSenElement * ipParent

CSenElement * ipParent [private]