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 <MSenElement.h>
00029
00030
00031
00037 class CSenElement : public CBase, public MSenElement
00038 {
00039 public:
00040
00041
00042
00048 virtual const TDesC8& LocalName() const = 0;
00049
00055 virtual const TDesC8& NamespaceURI() const = 0;
00056
00062 virtual void SetNamespaceL(const TDesC8& aNsUri) = 0;
00063
00070 virtual void SetNamespaceL( const TDesC8& aNsPrefix,
00071 const TDesC8& aNsUri) = 0;
00072
00080 virtual const CSenNamespace* AddNamespaceL( const TDesC8& aPrefix,
00081 const TDesC8& aUri) = 0;
00082
00089 virtual const CSenNamespace* Namespace() = 0;
00090
00098 virtual const CSenNamespace* Namespace(const TDesC8& aNsPrefix) = 0;
00099
00108 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00109 const TDesC8& aUri) = 0;
00110
00122 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00123 const TBool aCheckInParent) = 0;
00124
00130 virtual const TDesC8& NsPrefix() const = 0;
00131
00137 virtual void SetPrefixL(const TDesC8& aPrefix) = 0;
00138
00144 virtual TBool HasContent() const = 0;
00145
00151 virtual TPtrC8 Content() const = 0;
00152
00158 virtual HBufC* ContentUnicodeL() const = 0;
00159
00166 virtual TPtrC8 SetContentL(const TDesC8& aContent) = 0;
00167
00175 virtual RWriteStream& ContentWriteStreamL() = 0;
00176
00187 virtual TBool ConsistsOfL(MSenElement& aCandidate) = 0;
00188
00198 virtual TInt ElementsL(RPointerArray<CSenElement>& aElementArray,
00199 const TDesC8& aNsUri,
00200 const TDesC8& aLocalName) = 0;
00201
00210 virtual TInt ElementsL(RPointerArray<CSenElement>& aElementArray,
00211 const TDesC8& aLocalName) = 0;
00212
00219 virtual RPointerArray<CSenElement>& ElementsL() = 0;
00220
00231 virtual const CSenNamespace* AddNamespaceL(CSenNamespace& aNewNamespace,
00232 TBool aCheckInParent) = 0;
00233
00241 virtual const TDesC8* AttrValue(const TDesC8& aName) = 0;
00242
00250 virtual void AddAttrL(const TDesC8& aName, const TDesC8& aValue) = 0;
00251
00258 virtual RPointerArray<CSenBaseAttribute>& AttributesL() = 0;
00259
00266 virtual RPointerArray<CSenNamespace>& NamespacesL() = 0;
00267
00274 virtual CSenElement* Parent() = 0;
00275
00284 virtual CSenElement* SetParent(CSenElement* apParent) = 0;
00285
00295 virtual CSenElement* DetachL() = 0;
00296
00304 virtual CSenElement* Child(TInt aIndex) = 0;
00305
00311 virtual MSenElement& Root() = 0;
00312
00321 virtual CSenElement* Element(const TDesC8& aLocalName) = 0;
00322
00331 virtual CSenElement* Element(const TDesC8& aNsUri,
00332 const TDesC8& aLocalName) = 0;
00333
00347 virtual CSenElement* CreateElementL(const TDesC8& aNsPrefix,
00348 const TDesC8& aLocalName) = 0;
00349
00363 virtual CSenElement& InsertElementL(CSenElement& aInsertedElement,
00364 const CSenElement& aBeforeElement) = 0;
00365
00373 virtual CSenElement& AddElementL(CSenElement& aElement) = 0;
00374
00386 virtual CSenElement& AddElementL( const TDesC8& aNsUri,
00387 const TDesC8& aLocalName) = 0;
00388
00402 virtual CSenElement& AddElementL(const TDesC8& aNsUri,
00403 const TDesC8& aLocalName,
00404 const TDesC8& aQName) = 0;
00405
00419 virtual CSenElement& AddElementL(const TDesC8& aLocalName) = 0;
00420
00429 virtual CSenElement* RemoveElement(CSenElement& aElement) = 0;
00430
00440 virtual CSenElement* RemoveElement( const TDesC8& aNsUri,
00441 const TDesC8& aLocalName) = 0;
00442
00451 virtual CSenElement* RemoveElement(const TDesC8& aLocalName) = 0;
00452
00464 virtual CSenElement* ReplaceElementL(CSenElement& aElement) = 0;
00465
00472 virtual HBufC8* AsXmlL() = 0;
00473
00480 virtual HBufC* AsXmlUnicodeL() = 0;
00481
00487 virtual void WriteAsXMLToL(RWriteStream& aWriteStream) = 0;
00488
00494 virtual void WriteNamespacesToL(RWriteStream& aWriteStream) = 0;
00495
00503 virtual MSenElement* AsElement() = 0;
00504
00511 virtual void CopyFromL(CSenElement& aSource) = 0;
00512
00524 virtual void Set(const TDesC8& aNamespaceURI, const TDesC8& aLocalName, const TDesC8& aQName) = 0;
00525
00531 virtual void AddAttributesL(const RAttributeArray& apAttrs) = 0;
00532 };
00533
00534
00535 #endif
00536
00537
00538