MSenElement Class Reference
The abstract interface of an XML element SenXML.dll
- Since
- Series60 3.0
Public Member Functions |
---|
void | AddAttrL(const TDesC8 &, const TDesC8 &) |
void | AddAttributesL(const RAttributeArray &) |
CSenElement & | AddElementL(CSenElement &) |
CSenElement & | AddElementL(const TDesC8 &, const TDesC8 &) |
CSenElement & | AddElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
CSenElement & | AddElementL(const TDesC8 &) |
const CSenNamespace * | AddNamespaceL(const TDesC8 &, const TDesC8 &) |
const CSenNamespace * | AddNamespaceL(CSenNamespace &, TBool) |
MSenElement * | AsElement() |
HBufC8 * | AsXmlL() |
HBufC * | AsXmlUnicodeL() |
const TDesC8 * | AttrValue(const TDesC8 &) |
RPointerArray< CSenBaseAttribute > & | AttributesL() |
CSenElement * | Child(TInt) |
TBool
| ConsistsOfL(MSenElement &) |
TPtrC8
| Content() |
HBufC * | ContentUnicodeL() |
RWriteStream & | ContentWriteStreamL() |
void | CopyFromL(CSenElement &) |
CSenElement * | CreateElementL(const TDesC8 &, const TDesC8 &) |
CSenElement * | DetachL() |
CSenElement * | Element(const TDesC8 &) |
CSenElement * | Element(const TDesC8 &, const TDesC8 &) |
RPointerArray< CSenElement > & | ElementsL() |
TBool
| HasContent() |
CSenElement & | InsertElementL(CSenElement &, const CSenElement &) |
const TDesC8 & | LocalName() |
const CSenNamespace * | Namespace() |
const CSenNamespace * | Namespace(const TDesC8 &) |
const CSenNamespace * | Namespace(const TDesC8 &, const TDesC8 &) |
const CSenNamespace * | Namespace(const TDesC8 &, const TBool) |
const TDesC8 & | NamespaceURI() |
RPointerArray< CSenNamespace > & | NamespacesL() |
const TDesC8 & | NsPrefix() |
CSenElement * | Parent() |
CSenElement * | RemoveElement(CSenElement &) |
CSenElement * | RemoveElement(const TDesC8 &, const TDesC8 &) |
CSenElement * | RemoveElement(const TDesC8 &) |
CSenElement * | ReplaceElementL(CSenElement &) |
MSenElement & | Root() |
void | Set(const TDesC8 &, const TDesC8 &, const TDesC8 &) |
TPtrC8
| SetContentL(const TDesC8 &) |
void | SetNamespaceL(const TDesC8 &) |
void | SetNamespaceL(const TDesC8 &, const TDesC8 &) |
CSenElement * | SetParent(CSenElement *) |
void | SetPrefixL(const TDesC8 &) |
void | WriteAsXMLToL(RWriteStream &) |
void | WriteNamespacesToL(RWriteStream &) |
Member Functions Documentation
AddAttrL(const TDesC8 &, const TDesC8 &)
void | AddAttrL | ( | const TDesC8 & | aName, |
| const TDesC8 & | aValue |
| ) | [pure virtual] |
Adds an attribute. If attribute is already existing, the value of the attribute will be replaced.
Parameters
const TDesC8 & aName | Name of the attribute to be added. |
const TDesC8 & aValue | Value of the attribute to be added. |
AddAttributesL(const RAttributeArray &)
Adds new attributes to the element.
AddElementL(CSenElement &)
Adds an Element to the children elements. Sets this element to be the new parent of the given element.
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.
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.
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.
AddNamespaceL(const TDesC8 &, const TDesC8 &)
Method for adding a namespace for the Element.
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.
AsElement()
Gets the current element as XML element. Mostly used to get the classes which implement this interface as an instance of this interface.
AsXmlL()
HBufC8 * | AsXmlL | ( | ) | [pure virtual] |
Gets element as an UTF-8 form XML.
AsXmlUnicodeL()
HBufC * | AsXmlUnicodeL | ( | ) | [pure virtual] |
Gets the element as XML fragment in Unicode UCS2 format.
- Since
- Series60 3.0
AttrValue(const TDesC8 &)
Gets the value of the given attribute.
AttributesL()
Gets all the attributes of this element in an array.
Child(TInt)
Gets a child element from a specified index.
ConsistsOfL(MSenElement &)
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()
TPtrC8
| Content | ( | ) | const [pure virtual] |
Getter for the content of the element.
ContentUnicodeL()
HBufC * | ContentUnicodeL | ( | ) | const [pure virtual] |
Getter for the content of the element, unicode version.
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.
CopyFromL(CSenElement &)
Copies content from given element to this element appending to the existing content if there is any.
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.
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.
Element(const TDesC8 &)
Gets the child element with the specified local name. Assumes that namespace is the same as this parent element.
Element(const TDesC8 &, const TDesC8 &)
Gets the child element with the specified local name and namespace URI.
ElementsL()
Getting the child elements of this element.
HasContent()
TBool
| HasContent | ( | ) | const [pure virtual] |
Method for checking if the element has any content within.
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.
LocalName()
const TDesC8 & | LocalName | ( | ) | const [pure virtual] |
Getter for Element's local name.
Namespace()
Getter for Element's namespace.
Namespace(const TDesC8 &)
Get namespace that is declared for the given prefix
Namespace(const TDesC8 &, const TDesC8 &)
Get namespace that is declared for the given prefix and namespace URI within the scope of this Element.
Namespace(const TDesC8 &, const TBool)
Get namespace that is declared for the given prefix and namespace URI within the scope of this Element.
NamespaceURI()
const TDesC8 & | NamespaceURI | ( | ) | const [pure virtual] |
Getter for Element's namespace URI.
NamespacesL()
Gets all the namespaces of this element in an array.
NsPrefix()
const TDesC8 & | NsPrefix | ( | ) | const [pure virtual] |
Getter for namespace prefix of this element.
Parent()
Gets the parent element of this element.
RemoveElement(CSenElement &)
Remove an element from the childs.
RemoveElement(const TDesC8 &, const TDesC8 &)
Remove an element from the childs.
RemoveElement(const TDesC8 &)
Remove an element from the childs.
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.
Root()
Gets the root element. If no parent element, returns this element.
Set(const TDesC8 &, const TDesC8 &, const TDesC8 &)
void | Set | ( | const TDesC8 & | aNamespaceURI, |
| const TDesC8 & | aLocalName, |
| const TDesC8 & | aQName |
| ) | [pure 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.
SetContentL(const TDesC8 &)
Sets the content to the element. Old content is overwritten.
SetNamespaceL(const TDesC8 &)
void | SetNamespaceL | ( | const TDesC8 & | aNsUri | ) | [pure virtual] |
Setter for Element's namespace URI.
SetNamespaceL(const TDesC8 &, const TDesC8 &)
void | SetNamespaceL | ( | const TDesC8 & | aNsPrefix, |
| const TDesC8 & | aNsUri |
| ) | [pure virtual] |
Setter for Element's namespace URI.
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.
SetPrefixL(const TDesC8 &)
void | SetPrefixL | ( | const TDesC8 & | aPrefix | ) | [pure virtual] |
Setter for namespace prefix of this element.
WriteAsXMLToL(RWriteStream &)
Writes this element as XML, in UTF-8 form to a stream
- Since
- Series60 3.0
WriteNamespacesToL(RWriteStream &)
void | WriteNamespacesToL | ( | RWriteStream & | aWriteStream | ) | [pure virtual] |
Element writes its namespaces to a write stream using UTF-8 charset encoding.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.