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.
|
Public Member Functions |
virtual IMPORT_C | ~CSenBaseElement () |
| Destructor.
|
virtual IMPORT_C void | SetAttributesL (const RAttributeArray &apAttrs) |
| Adds attributes to the element.
|
virtual IMPORT_C const TDesC8 & | LocalName () const |
| Getter for Element's local name.
|
virtual IMPORT_C const TDesC8 & | NamespaceURI () const |
| Getter for Element's namespace URI.
|
virtual IMPORT_C const TDesC8 & | NsPrefix () const |
| Getter for namespace prefix of this element.
|
virtual IMPORT_C void | SetPrefixL (const TDesC8 &aPrefix) |
| Setter for namespace prefix of this element.
|
virtual IMPORT_C TBool | HasContent () const |
| Method for checking if the element has any content within.
|
virtual IMPORT_C TPtrC8 | Content () const |
| Getter for the content of the element.
|
virtual IMPORT_C HBufC * | ContentUnicodeL () const |
| Getter for the content of the element, unicode version.
|
virtual IMPORT_C TPtrC8 | SetContentL (const TDesC8 &aContent) |
| Sets the content to the element.
|
virtual IMPORT_C RWriteStream & | ContentWriteStreamL () |
| Gets the write stream for the content for easy appending.
|
virtual IMPORT_C TBool | ConsistsOfL (MSenElement &aCandidate) |
| Checks if element matches to another element by its content and child elements.
|
virtual IMPORT_C void | SetNamespaceL (const TDesC8 &aNsUri) |
| Setter for Element's namespace URI.
|
virtual IMPORT_C void | SetNamespaceL (const TDesC8 &aNsPrefix, const TDesC8 &aNsUri) |
| Setter for Element's namespace URI.
|
virtual IMPORT_C const CSenNamespace * | AddNamespaceL (CSenNamespace &aNewNamespace, TBool aCheckInParent) |
| Adds a namespace declaration.
|
virtual IMPORT_C const CSenNamespace * | AddNamespaceL (const TDesC8 &aPrefix, const TDesC8 &aUri) |
| Method for adding a namespace for the Element.
|
virtual IMPORT_C const CSenNamespace * | Namespace () |
| Getter for Element's namespace.
|
virtual IMPORT_C const CSenNamespace * | Namespace (const TDesC8 &aNsPrefix) |
virtual IMPORT_C const CSenNamespace * | Namespace (const TDesC8 &aNsPrefix, const TBool aCheckInParent) |
virtual IMPORT_C const CSenNamespace * | Namespace (const TDesC8 &aNsPrefix, const TDesC8 &aUri) |
virtual IMPORT_C TInt | ElementsL (RPointerArray< CSenElement > &aElementArray, const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
| Getting the child elements of this element matching the given criteria.
|
virtual IMPORT_C TInt | ElementsL (RPointerArray< CSenElement > &aElementArray, const TDesC8 &aLocalName) |
| Getting the child elements of this element matching the given criteria.
|
virtual IMPORT_C RPointerArray<
CSenElement > & | ElementsL () |
| Getting the child elements of this element.
|
virtual IMPORT_C RPointerArray<
CSenBaseAttribute > & | AttributesL () |
| Gets all the attributes of this element in an array.
|
virtual IMPORT_C RPointerArray<
CSenNamespace > & | NamespacesL () |
| Gets all the namespaces of this element in an array.
|
virtual IMPORT_C const TDesC8 * | AttrValue (const TDesC8 &aName) |
| Gets the value of the given attribute.
|
virtual IMPORT_C void | AddAttrL (const TDesC8 &aName, const TDesC8 &aValue) |
| Adds an attribute.
|
virtual IMPORT_C CSenElement * | Parent () |
| Gets the parent element of this element.
|
virtual IMPORT_C CSenElement * | SetParent (CSenElement *apParent) |
| Sets the parent element to this element.
|
virtual IMPORT_C MSenElement & | Root () |
| Gets the root element.
|
virtual IMPORT_C CSenElement * | Element (const TDesC8 &aLocalName) |
| Gets the child element with the specified local name.
|
virtual IMPORT_C CSenElement * | Element (const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
| Gets the child element with the specified local name and namespace URI.
|
virtual IMPORT_C CSenElement * | CreateElementL (const TDesC8 &aNsPrefix, const TDesC8 &aLocalName) |
| Create a new element ready for adding or insertion.
|
virtual IMPORT_C CSenElement & | InsertElementL (CSenElement &aElement, const CSenElement &aBeforeElement) |
| Insert an Element into the list of children elements so that the inserted Element is placed right before the aBeforeElement.
|
virtual IMPORT_C CSenElement & | AddElementL (CSenElement &aElement) |
| Adds an Element to the children elements.
|
virtual IMPORT_C CSenElement & | AddElementL (const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
| Constructs and adds a new element to the children elements.
|
virtual IMPORT_C CSenElement & | AddElementL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName) |
| Constructs and adds a new element to the children elements.
|
virtual IMPORT_C CSenElement & | AddElementL (const TDesC8 &aLocalName) |
| Constructs and adds a new element to the children elements.
|
virtual IMPORT_C CSenElement * | RemoveElement (CSenElement &aElement) |
| Remove an element from the childs.
|
virtual IMPORT_C CSenElement * | RemoveElement (const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
| Remove an element from the childs.
|
virtual IMPORT_C CSenElement * | RemoveElement (const TDesC8 &aLocalName) |
| Remove an element from the childs.
|
virtual IMPORT_C CSenElement * | ReplaceElementL (CSenElement &aElement) |
| Replaces an element from the childs with another element.
|
virtual IMPORT_C HBufC8 * | AsXmlL () |
| Gets the element as an XML buffer.
|
virtual IMPORT_C HBufC * | AsXmlUnicodeL () |
| Gets the element as an unicode XML buffer.
|
virtual IMPORT_C void | WriteAsXMLToL (RWriteStream &aWriteStream) |
| Element writes itself to a write stream using UTF-8 charset encoding.
|
virtual IMPORT_C void | WriteNamespacesToL (RWriteStream &aWriteStream) |
| Element writes its namespaces to a write stream using UTF-8 charset encoding.
|
virtual IMPORT_C MSenElement * | AsElement () |
| Gets the current element as XML element.
|
IMPORT_C void | CopyFromL (CSenElement &aSource) |
| Copies content from given element to this element appending to the existing content if there is any.
|
virtual IMPORT_C CSenElement * | DetachL () |
| Detach the element from its parent.
|
virtual IMPORT_C CSenElement * | Child (TInt aIndex) |
| Gets a child element from a specified index.
|
virtual IMPORT_C void | Set (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName) |
| (Re-) Set the name and namespace of this Element.
|
virtual IMPORT_C void | AddAttributesL (const RAttributeArray &apAttrs) |
| Adds new attributes to the element.
|
Static Public Member Functions |
static IMPORT_C CSenBaseElement * | NewL (const TDesC8 &aLocalName) |
| Standard constructor.
|
static IMPORT_C CSenBaseElement * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
| Standard constructor.
|
static IMPORT_C CSenBaseElement * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName) |
| Standard constructor.
|
static IMPORT_C CSenBaseElement * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName, const RAttributeArray &apAttrs) |
| Standard constructor.
|
static IMPORT_C CSenBaseElement * | NewL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName, const RAttributeArray &apAttrs, CSenElement &aParent) |
| Standard constructor.
|
Protected Member Functions |
IMPORT_C | CSenBaseElement () |
| C++ default constructor.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aLocalName) |
| Following BaseConstructL methods should be called from the deriving classes ConstructL() methods.
|
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName) |
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName) |
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName, const RAttributeArray &apAttrs) |
IMPORT_C void | BaseConstructL (const TDesC8 &aNsUri, const TDesC8 &aLocalName, const TDesC8 &aQName, const RAttributeArray &apAttrs, CSenElement &aParent) |
virtual IMPORT_C CSenBaseAttribute * | FindAttr (const TDesC8 &aName) |
| Method for finding an attribute with given name.
|
virtual IMPORT_C TInt | IndexOfElement (const TDesC8 &aNsUri, const TDesC8 &aLocalName) const |
| Method for finding index for a wanted element.
|
virtual IMPORT_C void | WriteAttrsToL (RWriteStream &aWriteStream) |
| Writes element's attributes into a writestream.
|
virtual IMPORT_C void | WriteAttrToL (RWriteStream &aWriteStream, const TDesC8 &aName, const TDesC8 &aValue) |
| Helper function to write an attribute into a writestream.
|
virtual IMPORT_C void | WriteElementsToL (RWriteStream &aWriteStream) |
| Writes all internal elements into a writestream.
|
virtual IMPORT_C void | WriteContentToL (RWriteStream &aWriteStream) |
| Writes all element's content into a writestream.
|
virtual IMPORT_C const TDesC8 & | AddAttributeL (const TDesC8 &aQName, const TDesC8 &aLocalName, const TDesC8 &aValue) |
| Adds an attribute into this element.
|
virtual IMPORT_C const TDesC8 & | AddAttributeL (const TDesC8 &aAttrName, const TDesC8 &aValue) |
| Adds an attribute into this element.
|
IMPORT_C const TDesC8 & | AddAttributeL (CSenBaseAttribute *apAttribute) |
| Adds an attribute into this element.
|
virtual IMPORT_C void | AllocContentBufL () |
| Allocates a new buffer for saving content, if none allocated yet.
|
virtual IMPORT_C TPtrC8 | WriteToBufL (CBufBase &aBuf) |
| Writes element into a dynamic buffer.
|