00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SEN_ELEMENT_H
00022 #define SEN_ELEMENT_H
00023
00024
00025 #include <e32base.h>
00026 #include <s32strm.h>
00027 #include <xml\Attribute.h>
00028 #include <stringpool.h>
00029
00030 #include <MSenElement.h>
00031
00032 using namespace Xml;
00033
00034
00035
00041 class CSenElement : public CBase, public MSenElement
00042 {
00043 public:
00044
00045
00046
00052 virtual const TDesC8& LocalName() const = 0;
00053
00059 virtual const TDesC8& NamespaceURI() const = 0;
00060
00066 virtual void SetNamespaceL(const TDesC8& aNsUri) = 0;
00067
00074 virtual void SetNamespaceL( const TDesC8& aNsPrefix,
00075 const TDesC8& aNsUri) = 0;
00076
00084 virtual const CSenNamespace* AddNamespaceL( const TDesC8& aPrefix,
00085 const TDesC8& aUri) = 0;
00086
00093 virtual const CSenNamespace* Namespace() = 0;
00094
00102 virtual const CSenNamespace* Namespace(const TDesC8& aNsPrefix) = 0;
00103
00114 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00115 const TDesC8& aUri) = 0;
00116
00128 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00129 const TBool aCheckInParent) = 0;
00130
00136 virtual const TDesC8& NsPrefix() const = 0;
00137
00143 virtual void SetPrefixL(const TDesC8& aPrefix) = 0;
00144
00150 virtual TBool HasContent() const = 0;
00151
00157 virtual TPtrC8 Content() const = 0;
00158
00164 virtual HBufC* ContentUnicodeL() const = 0;
00165
00172 virtual TPtrC8 SetContentL(const TDesC8& aContent) = 0;
00173
00181 virtual RWriteStream& ContentWriteStreamL() = 0;
00182
00193 virtual TBool ConsistsOfL(MSenElement& aCandidate) = 0;
00194
00205 virtual TInt ElementsL(RPointerArray<CSenElement>& aElementArray,
00206 const TDesC8& aNsUri,
00207 const TDesC8& aLocalName) = 0;
00208
00218 virtual TInt ElementsL(RPointerArray<CSenElement>& aElementArray,
00219 const TDesC8& aLocalName) = 0;
00220
00227 virtual RPointerArray<CSenElement>& ElementsL() = 0;
00228
00239 virtual const CSenNamespace* AddNamespaceL(CSenNamespace& aNewNamespace,
00240 TBool aCheckInParent) = 0;
00241
00249 virtual const TDesC8* AttrValue(const TDesC8& aName) = 0;
00250
00258 virtual void AddAttrL(const TDesC8& aName, const TDesC8& aValue) = 0;
00259
00266 virtual RPointerArray<CSenBaseAttribute>& AttributesL() = 0;
00267
00274 virtual RPointerArray<CSenNamespace>& NamespacesL() = 0;
00275
00282 virtual CSenElement* Parent() = 0;
00283
00294 virtual CSenElement* SetParent(CSenElement* apParent) = 0;
00295
00305 virtual CSenElement* DetachL() = 0;
00306
00314 virtual CSenElement* Child(TInt aIndex) = 0;
00315
00321 virtual MSenElement& Root() = 0;
00322
00331 virtual CSenElement* Element(const TDesC8& aLocalName) = 0;
00332
00341 virtual CSenElement* Element(const TDesC8& aNsUri,
00342 const TDesC8& aLocalName) = 0;
00343
00357 virtual CSenElement* CreateElementL(const TDesC8& aNsPrefix,
00358 const TDesC8& aLocalName) = 0;
00359
00373 virtual CSenElement& InsertElementL(CSenElement& aInsertedElement,
00374 const CSenElement& aBeforeElement) = 0;
00375
00383 virtual CSenElement& AddElementL(CSenElement& aElement) = 0;
00384
00396 virtual CSenElement& AddElementL( const TDesC8& aNsUri,
00397 const TDesC8& aLocalName) = 0;
00398
00414 virtual CSenElement& AddElementL(const TDesC8& aNsUri,
00415 const TDesC8& aLocalName,
00416 const TDesC8& aQName) = 0;
00417
00433 virtual CSenElement& AddElementL(const TDesC8& aLocalName) = 0;
00434
00443 virtual CSenElement* RemoveElement(CSenElement& aElement) = 0;
00444
00454 virtual CSenElement* RemoveElement( const TDesC8& aNsUri,
00455 const TDesC8& aLocalName) = 0;
00456
00466 virtual CSenElement* RemoveElement(const TDesC8& aLocalName) = 0;
00467
00481 virtual CSenElement* ReplaceElementL(CSenElement& aElement) = 0;
00482
00489 virtual HBufC8* AsXmlL() = 0;
00490
00497 virtual HBufC* AsXmlUnicodeL() = 0;
00498
00505 virtual void WriteAsXMLToL(RWriteStream& aWriteStream) = 0;
00506
00513 virtual void WriteNamespacesToL(RWriteStream& aWriteStream) = 0;
00514
00521 virtual MSenElement* AsElement() = 0;
00522
00529 virtual void CopyFromL(CSenElement& aSource) = 0;
00530
00542 virtual void Set(const TDesC8& aNamespaceURI, const TDesC8& aLocalName, const TDesC8& aQName) = 0;
00543
00549 virtual void AddAttributesL(const RAttributeArray& apAttrs) = 0;
00550 };
00551
00552 #endif //SEN_ELEMENT_H
00553
00554
00555