#include <mw/SenBaseElement.h>
class CSenBaseElement : public CSenElement |
Public Member Functions | |
---|---|
virtual | ~CSenBaseElement() |
virtual IMPORT_C void | AddAttrL(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C void | AddAttributesL(const RAttributeArray &) |
virtual IMPORT_C CSenElement & | AddElementL(CSenElement &) |
virtual IMPORT_C CSenElement & | AddElementL(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C CSenElement & | AddElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C CSenElement & | AddElementL(const TDesC8 &) |
virtual IMPORT_C const CSenNamespace * | AddNamespaceL(CSenNamespace &, TBool) |
virtual IMPORT_C const CSenNamespace * | AddNamespaceL(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C MSenElement * | AsElement() |
virtual IMPORT_C HBufC8 * | AsXmlL() |
virtual IMPORT_C HBufC * | AsXmlUnicodeL() |
virtual IMPORT_C const TDesC8 * | AttrValue(const TDesC8 &) |
virtual IMPORT_C RPointerArray< CSenBaseAttribute > & | AttributesL() |
virtual IMPORT_C CSenElement * | Child(TInt) |
virtual IMPORT_C TBool | ConsistsOfL(MSenElement &) |
virtual IMPORT_C TPtrC8 | Content() |
virtual IMPORT_C HBufC * | ContentUnicodeL() |
virtual IMPORT_C RWriteStream & | ContentWriteStreamL() |
virtual IMPORT_C void | CopyFromL(CSenElement &) |
virtual IMPORT_C CSenElement * | CreateElementL(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C CSenElement * | DetachL() |
virtual IMPORT_C CSenElement * | Element(const TDesC8 &) |
virtual IMPORT_C CSenElement * | Element(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C TInt | ElementsL(RPointerArray< CSenElement > &, const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C TInt | ElementsL(RPointerArray< CSenElement > &, const TDesC8 &) |
virtual IMPORT_C RPointerArray< CSenElement > & | ElementsL() |
virtual IMPORT_C TBool | HasContent() |
virtual IMPORT_C CSenElement & | InsertElementL(CSenElement &, const CSenElement &) |
virtual IMPORT_C const TDesC8 & | LocalName() |
virtual IMPORT_C const CSenNamespace * | Namespace() |
virtual IMPORT_C const CSenNamespace * | Namespace(const TDesC8 &) |
virtual IMPORT_C const CSenNamespace * | Namespace(const TDesC8 &, const TBool) |
virtual IMPORT_C const CSenNamespace * | Namespace(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C const TDesC8 & | NamespaceURI() |
virtual IMPORT_C RPointerArray< CSenNamespace > & | NamespacesL() |
IMPORT_C CSenBaseElement * | NewL(const TDesC8 &) |
IMPORT_C CSenBaseElement * | NewL(const TDesC8 &, const TDesC8 &) |
IMPORT_C CSenBaseElement * | NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
IMPORT_C CSenBaseElement * | NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &) |
IMPORT_C CSenBaseElement * | NewL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, CSenElement &) |
virtual IMPORT_C const TDesC8 & | NsPrefix() |
virtual IMPORT_C CSenElement * | Parent() |
virtual IMPORT_C CSenElement * | RemoveElement(CSenElement &) |
virtual IMPORT_C CSenElement * | RemoveElement(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C CSenElement * | RemoveElement(const TDesC8 &) |
virtual IMPORT_C CSenElement * | ReplaceElementL(CSenElement &) |
virtual IMPORT_C MSenElement & | Root() |
virtual IMPORT_C void | Set(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C void | SetAttributesL(const RAttributeArray &) |
virtual IMPORT_C TPtrC8 | SetContentL(const TDesC8 &) |
virtual IMPORT_C void | SetNamespaceL(const TDesC8 &) |
virtual IMPORT_C void | SetNamespaceL(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C CSenElement * | SetParent(CSenElement *) |
virtual IMPORT_C void | SetPrefixL(const TDesC8 &) |
virtual IMPORT_C void | WriteAsXMLToL(RWriteStream &) |
virtual IMPORT_C void | WriteNamespacesToL(RWriteStream &) |
Protected Member Functions | |
---|---|
CSenBaseElement() | |
virtual IMPORT_C const TDesC8 & | AddAttributeL(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C const TDesC8 & | AddAttributeL(const TDesC8 &, const TDesC8 &) |
IMPORT_C const TDesC8 & | AddAttributeL(CSenBaseAttribute *) |
virtual 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 &) |
virtual IMPORT_C CSenBaseAttribute * | FindAttr(const TDesC8 &) |
virtual IMPORT_C TInt | IndexOfElement(const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C void | WriteAttrToL(RWriteStream &, const TDesC8 &, const TDesC8 &) |
virtual IMPORT_C void | WriteAttrsToL(RWriteStream &) |
virtual IMPORT_C void | WriteContentToL(RWriteStream &) |
virtual IMPORT_C void | WriteElementsToL(RWriteStream &) |
virtual IMPORT_C TPtrC8 | WriteToBufL(CBufBase &) |
Reimplemented from CSenElement::AddAttrL(const TDesC8 &,const TDesC8 &)
Adds an attribute. If attribute is already existing, the value of the attribute will be replaced.
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.
Parameter | Description |
---|---|
aQName | Attribute's qualified name |
aLocalName | Attribute's local name |
aValue | Attribute's value |
Returns: value of the attribute as string (TDesC&) Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contain illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
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.
Parameter | Description |
---|---|
aValue | Attribute's value |
Returns: value of the attribute as string (TDesC&) Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aAttrName is zero length, or if the local name part of it is zero length.
IMPORT_C const TDesC8 & | AddAttributeL | ( | CSenBaseAttribute * | apAttribute | ) | [protected] |
Adds an attribute into this element.
Parameter | Description |
---|---|
apAttribute | Attribute to be added. Ownership is transferred to this element. |
Returns: attribute value as a string (TDesC8&)
IMPORT_C void | AddAttributesL | ( | const RAttributeArray & | apAttrs | ) | [virtual] |
Reimplemented from CSenElement::AddAttributesL(const RAttributeArray &)
Adds new attributes to the element.
IMPORT_C CSenElement & | AddElementL | ( | CSenElement & | aElement | ) | [virtual] |
Reimplemented from CSenElement::AddElementL(CSenElement &)
Adds an Element to the children elements. Sets this element to be the new parent of the given element.
Returns: the added Element
IMPORT_C CSenElement & | AddElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Reimplemented from CSenElement::AddElementL(const TDesC8 &,const TDesC8 &)
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.
Returns: the added Element Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.
IMPORT_C CSenElement & | AddElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [virtual] |
Reimplemented from CSenElement::AddElementL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.
Returns: the added Element Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contain illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
IMPORT_C CSenElement & | AddElementL | ( | const TDesC8 & | aLocalName | ) | [virtual] |
Reimplemented from CSenElement::AddElementL(const TDesC8 &)
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.
Returns: the added Element Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length.
IMPORT_C const CSenNamespace * | AddNamespaceL | ( | CSenNamespace & | aNewNamespace, |
TBool | aCheckInParent | |||
) | [virtual] |
Reimplemented from CSenElement::AddNamespaceL(CSenNamespace &,TBool)
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.
Returns: the added Namespace, or the equivalent pre-existing one.
IMPORT_C const CSenNamespace * | AddNamespaceL | ( | const TDesC8 & | aPrefix, |
const TDesC8 & | aUri | |||
) | [virtual] |
Reimplemented from CSenElement::AddNamespaceL(const TDesC8 &,const TDesC8 &)
Method for adding a namespace for the Element.
Returns: the added Namespace, or the equivalent pre-existing one.
IMPORT_C void | AllocContentBufL | ( | ) | [protected, virtual] |
Allocates a new buffer for saving content, if none allocated yet.
IMPORT_C MSenElement * | AsElement | ( | ) | [virtual] |
Reimplemented from CSenElement::AsElement()
Gets the current element as XML element. Mostly used to get the classes which implement this interface as an instance of this interface.
Returns: the current object as element. Ownership is NOT transferred.
IMPORT_C HBufC8 * | AsXmlL | ( | ) | [virtual] |
Reimplemented from CSenElement::AsXmlL()
Gets the element as an XML buffer. Buffer will contain all the childs
Returns: element as XML. Caller takes ownership.
IMPORT_C HBufC * | AsXmlUnicodeL | ( | ) | [virtual] |
Reimplemented from CSenElement::AsXmlUnicodeL()
Gets the element as an unicode XML buffer. Buffer will contain all the childs etc.
Returns: element as XML. Caller takes ownership.
Reimplemented from CSenElement::AttrValue(const TDesC8 &)
Gets the value of the given attribute.
Returns: the value of the attribute, or NULL if not found. Ownership is NOT TRANSFERRED.
IMPORT_C RPointerArray< CSenBaseAttribute > & | AttributesL | ( | ) | [virtual] |
Reimplemented from CSenElement::AttributesL()
Gets all the attributes of this element in an array.
Returns: array of attributes. Array will be empty if element has no attributes.
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.
IMPORT_C void | BaseConstructL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs | |||
) | [protected] |
IMPORT_C void | BaseConstructL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs, | |||
CSenElement & | aParent | |||
) | [protected] |
IMPORT_C CSenElement * | Child | ( | TInt | aIndex | ) | [virtual] |
Reimplemented from CSenElement::Child(TInt)
Gets a child element from a specified index.
Returns: child element from a current index. NULL if no child in given index is found
IMPORT_C TBool | ConsistsOfL | ( | MSenElement & | aCandidate | ) | [virtual] |
Reimplemented from CSenElement::ConsistsOfL(MSenElement &)
Parameter | Description |
---|---|
aCandidate | The pattern to be matched. Must contain same or less data for match to come true. |
Returns: ETrue if content and possible children match exactly to given pattern. EFalse otherwise.
IMPORT_C TPtrC8 | Content | ( | ) | const [virtual] |
Reimplemented from CSenElement::Content()const
Getter for the content of the element.
Returns: the content or KNullDesC if empty.
IMPORT_C HBufC * | ContentUnicodeL | ( | ) | const [virtual] |
Reimplemented from CSenElement::ContentUnicodeL()const
Getter for the content of the element, unicode version.
Returns: content as unicode. Ownership IS TRANSFERRED to the caller.
IMPORT_C RWriteStream & | ContentWriteStreamL | ( | ) | [virtual] |
Reimplemented from CSenElement::ContentWriteStreamL()
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.
Returns: reference to the RWriteStream.
IMPORT_C void | CopyFromL | ( | CSenElement & | aSource | ) | [virtual] |
Reimplemented from CSenElement::CopyFromL(CSenElement &)
Copies content from given element to this element appending to the existing content if there is any.
IMPORT_C CSenElement * | CreateElementL | ( | const TDesC8 & | aNsPrefix, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Reimplemented from CSenElement::CreateElementL(const TDesC8 &,const TDesC8 &)
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.
Returns: the new Element just created, or NULL if given prefix was not declared yet. Ownership is transferred to the caller. Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length.
IMPORT_C CSenElement * | DetachL | ( | ) | [virtual] |
Reimplemented from CSenElement::DetachL()
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.
Returns: this Element. Ownership IS TRANSFERRED to the caller.
IMPORT_C CSenElement * | Element | ( | const TDesC8 & | aLocalName | ) | [virtual] |
Reimplemented from CSenElement::Element(const TDesC8 &)
Gets the child element with the specified local name. Assumes that namespace is the same as this parent element.
Returns: the child element or NULL if the child with the specified local name is not found. Ownership is NOT transferred.
IMPORT_C CSenElement * | Element | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Reimplemented from CSenElement::Element(const TDesC8 &,const TDesC8 &)
Gets the child element with the specified local name and namespace URI.
Returns: the child element or NULL if the child with the specified criterias is not found. Ownership is NOT transferred.
IMPORT_C TInt | ElementsL | ( | RPointerArray< CSenElement > & | aElementArray, |
const TDesC8 & | aNsUri, | |||
const TDesC8 & | aLocalName | |||
) | [virtual] |
Reimplemented from CSenElement::ElementsL(RPointerArray< CSenElement > &,const TDesC8 &,const TDesC8 &)
Getting the child elements of this element matching the given criteria.
Returns: KErrNone ok KErrNotFound No child elements exist.
IMPORT_C TInt | ElementsL | ( | RPointerArray< CSenElement > & | aElementArray, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Reimplemented from CSenElement::ElementsL(RPointerArray< CSenElement > &,const TDesC8 &)
Getting the child elements of this element matching the given criteria.
Returns: KErrNone ok KErrNotFound No child elements exist.
IMPORT_C RPointerArray< CSenElement > & | ElementsL | ( | ) | [virtual] |
Reimplemented from CSenElement::ElementsL()
Getting the child elements of this element.
Returns: an array of child elements. This is an empty array if there are no children. Any modifications made on the returned array modify the element object.
IMPORT_C CSenBaseAttribute * | FindAttr | ( | const TDesC8 & | aName | ) | [protected, virtual] |
Method for finding an attribute with given name.
Parameter | Description |
---|---|
aName | a name of the attribute to be searched for |
Returns: the 1st attribute with the name, or NULL. Ownership is not transferred.
IMPORT_C TBool | HasContent | ( | ) | const [virtual] |
Reimplemented from CSenElement::HasContent()const
Method for checking if the element has any content within.
Returns: ETrue if has content, EFalse if not.
IMPORT_C TInt | IndexOfElement | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | const [protected, virtual] |
Method for finding index for a wanted element.
Parameter | Description |
---|---|
aNsUri | a namespace URI which needs to match |
aLocalName | a local name which needs to match |
Returns: Index of the element with given characteristics. or KErrNotFound if none matching
IMPORT_C CSenElement & | InsertElementL | ( | CSenElement & | aElement, |
const CSenElement & | aBeforeElement | |||
) | [virtual] |
Reimplemented from CSenElement::InsertElementL(CSenElement &,const CSenElement &)
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.
Returns: the inserted Element
IMPORT_C const TDesC8 & | LocalName | ( | ) | const [virtual] |
Reimplemented from CSenElement::LocalName()const
Getter for Element's local name.
Returns: Localname or KNullDesC if not set.
IMPORT_C const CSenNamespace * | Namespace | ( | ) | [virtual] |
Reimplemented from CSenElement::Namespace()
Getter for Element's namespace.
Returns: const pointer to the CSenNamespace object of this Element. NULL if not set.
IMPORT_C const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix | ) | [virtual] |
Reimplemented from CSenElement::Namespace(const TDesC8 &)
Returns: the found Namespace that is declared for the given prefix within the scope of this Element. If no such prefix is declared return null.
IMPORT_C const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix, |
const TBool | aCheckInParent | |||
) | [virtual] |
Reimplemented from CSenElement::Namespace(const TDesC8 &,const TBool)
Returns: the found Namespace that is declared for the given prefix and namespace URI within the scope of this Element or NULL if not found
IMPORT_C const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix, |
const TDesC8 & | aUri | |||
) | [virtual] |
Reimplemented from CSenElement::Namespace(const TDesC8 &,const TDesC8 &)
Returns: the found Namespace that is declared for the given prefix and namespace URI within the scope of this Element or NULL if not found.
IMPORT_C const TDesC8 & | NamespaceURI | ( | ) | const [virtual] |
Reimplemented from CSenElement::NamespaceURI()const
Getter for Element's namespace URI.
Returns: Namespace URI or KNullDesC if not set.
IMPORT_C RPointerArray< CSenNamespace > & | NamespacesL | ( | ) | [virtual] |
Reimplemented from CSenElement::NamespacesL()
Gets all the namespaces of this element in an array.
Returns: array of namespaces. Array will be empty if element has no namespaces.
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aLocalName | ) | [static] |
Standard constructor.
Parameter | Description |
---|---|
aLocalName | the local name for this element. Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length. |
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [static] |
Standard constructor.
Parameter | Description |
---|---|
aNsUri | the namespace URI for this element. |
aLocalName | the local name for this element. Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length. |
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [static] |
Standard constructor.
Parameter | Description |
---|---|
aNsUri | the namespace URI for this element. |
aLocalName | the local name for this element. |
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. |
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs | |||
) | [static] |
Standard constructor.
Parameter | Description |
---|---|
aNsUri | the namespace URI for this element. |
aLocalName | the local name for this element. |
aQName | the qualified name for this element. |
apAttrs | the attributes for this element. Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length. |
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs, | |||
CSenElement & | aParent | |||
) | [static] |
Standard constructor.
Parameter | Description |
---|---|
aNsUri | the namespace URI for this element. |
aLocalName | the local name for this element. |
aQName | the qualified name for this element. |
apAttrs | the attributes for this element. |
IMPORT_C const TDesC8 & | NsPrefix | ( | ) | const [virtual] |
Reimplemented from CSenElement::NsPrefix()const
Getter for namespace prefix of this element.
Returns: namespace prefix or KNullDesC if not set.
IMPORT_C CSenElement * | Parent | ( | ) | [virtual] |
Reimplemented from CSenElement::Parent()
Gets the parent element of this element.
Returns: the parent element or NULL if no parent set. Ownership is NOT transferred to the caller.
IMPORT_C CSenElement * | RemoveElement | ( | CSenElement & | aElement | ) | [virtual] |
Reimplemented from CSenElement::RemoveElement(CSenElement &)
Remove an element from the childs.
Returns: The removed element. May be NULL if nothing was removed (if element was not found from the childs). The caller TAKES OWNERSHIP of the removed element.
IMPORT_C CSenElement * | RemoveElement | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Reimplemented from CSenElement::RemoveElement(const TDesC8 &,const TDesC8 &)
Remove an element from the childs.
Returns: The removed element. May be NULL if nothing was removed (if element was not found from the childs). The caller TAKES OWNERSHIP of the removed element.
IMPORT_C CSenElement * | RemoveElement | ( | const TDesC8 & | aLocalName | ) | [virtual] |
Reimplemented from CSenElement::RemoveElement(const TDesC8 &)
Remove an element from the childs.
Returns: The removed element. May be NULL if nothing was removed (if element was not found from the childs). The caller TAKES OWNERSHIP of the removed element.
IMPORT_C CSenElement * | ReplaceElementL | ( | CSenElement & | aElement | ) | [virtual] |
Reimplemented from CSenElement::ReplaceElementL(CSenElement &)
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.
Returns: The old element. May be NULL if nothing was replaced (if element was not found from the childs). The caller TAKES OWNERSHIP of the old element.
IMPORT_C MSenElement & | Root | ( | ) | [virtual] |
Reimplemented from CSenElement::Root()
Gets the root element. If no parent element, returns this element.
Returns: the root of the tree. Ownership is NOT transferred.
Reimplemented from CSenElement::Set(const TDesC8 &,const TDesC8 &,const TDesC8 &)
(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.
IMPORT_C void | SetAttributesL | ( | const RAttributeArray & | apAttrs | ) | [virtual] |
Adds attributes to the element. Calls internally AddAttributesL() Can be overridden to replace old attributes.
Reimplemented from CSenElement::SetContentL(const TDesC8 &)
Sets the content to the element. Old content is overwritten.
Returns: The content of the element or KNullDesC8 if no content was set.
IMPORT_C void | SetNamespaceL | ( | const TDesC8 & | aNsUri | ) | [virtual] |
Reimplemented from CSenElement::SetNamespaceL(const TDesC8 &)
Setter for Element's namespace URI.
Reimplemented from CSenElement::SetNamespaceL(const TDesC8 &,const TDesC8 &)
Setter for Element's namespace URI.
IMPORT_C CSenElement * | SetParent | ( | CSenElement * | apParent | ) | [virtual] |
Reimplemented from CSenElement::SetParent(CSenElement *)
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.
Returns: the parent element
IMPORT_C void | SetPrefixL | ( | const TDesC8 & | aPrefix | ) | [virtual] |
Reimplemented from CSenElement::SetPrefixL(const TDesC8 &)
Setter for namespace prefix of this element.
IMPORT_C void | WriteAsXMLToL | ( | RWriteStream & | aWriteStream | ) | [virtual] |
Reimplemented from CSenElement::WriteAsXMLToL(RWriteStream &)
Element writes itself to a write stream using UTF-8 charset encoding.
IMPORT_C void | WriteAttrToL | ( | RWriteStream & | aWriteStream, |
const TDesC8 & | aName, | |||
const TDesC8 & | aValue | |||
) | [protected, virtual] |
Helper function to write an attribute into a writestream.
Parameter | Description |
---|---|
aWriteStream | writestream to write into |
aName | attribute name |
aValue | attribute value |
IMPORT_C void | WriteAttrsToL | ( | RWriteStream & | aWriteStream | ) | [protected, virtual] |
Writes element's attributes into a writestream.
Parameter | Description |
---|---|
aWriteStream | writestream to write into |
IMPORT_C void | WriteContentToL | ( | RWriteStream & | aWriteStream | ) | [protected, virtual] |
Writes all element's content into a writestream.
Parameter | Description |
---|---|
aWriteStream | writestream to write into |
IMPORT_C void | WriteElementsToL | ( | RWriteStream & | aWriteStream | ) | [protected, virtual] |
Writes all internal elements into a writestream.
Parameter | Description |
---|---|
aWriteStream | writestream to write into |
IMPORT_C void | WriteNamespacesToL | ( | RWriteStream & | aWriteStream | ) | [virtual] |
Reimplemented from CSenElement::WriteNamespacesToL(RWriteStream &)
Element writes its namespaces to a write stream using UTF-8 charset encoding.