00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef M_SEN_ELEMENT_H
00022 #define M_SEN_ELEMENT_H
00023
00024
00025 #include <e32base.h>
00026 #include <s32strm.h>
00027 #include <xml\Attribute.h>
00028
00029
00030 class CSenElement;
00031 class CSenBaseAttribute;
00032 class CSenNamespace;
00033
00034 using namespace Xml;
00035
00036
00037
00043 class MSenElement
00044 {
00045 public:
00046
00051 virtual const TDesC8& LocalName() const = 0;
00052
00057 virtual const TDesC8& NamespaceURI() const = 0;
00058
00063 virtual void SetNamespaceL(const TDesC8& aNsUri) = 0;
00064
00070 virtual void SetNamespaceL( const TDesC8& aNsPrefix,
00071 const TDesC8& aNsUri) = 0;
00072
00079 virtual const CSenNamespace* AddNamespaceL( const TDesC8& aPrefix,
00080 const TDesC8& aUri) = 0;
00081
00091 virtual const CSenNamespace* AddNamespaceL( CSenNamespace& aNewNamespace,
00092 TBool aCheckInParent) = 0;
00098 virtual const CSenNamespace* Namespace() = 0;
00099
00106 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix) = 0;
00107
00117 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00118 const TDesC8& aUri) = 0;
00119
00132 virtual const CSenNamespace* Namespace( const TDesC8& aNsPrefix,
00133 const TBool aCheckInParent) = 0;
00134
00139 virtual const TDesC8& NsPrefix() const = 0;
00140
00145 virtual void SetPrefixL(const TDesC8& aPrefix) = 0;
00146
00151 virtual TBool HasContent() const = 0;
00152
00157 virtual TPtrC8 Content() const = 0;
00158
00163 virtual HBufC* ContentUnicodeL() const = 0;
00164
00170 virtual TPtrC8 SetContentL(const TDesC8& aContent) = 0;
00171
00178 virtual RWriteStream& ContentWriteStreamL() = 0;
00179
00190 virtual TBool ConsistsOfL(MSenElement& aCandidate) = 0;
00191
00198 virtual RPointerArray<CSenElement>& ElementsL() = 0;
00199
00206 virtual CSenElement* Child(TInt aIndex) = 0;
00207
00214 virtual const TDesC8* AttrValue(const TDesC8& aName) = 0;
00215
00222 virtual void AddAttrL(const TDesC8& aName, const TDesC8& aValue) = 0;
00223
00229 virtual RPointerArray<CSenBaseAttribute>& AttributesL() = 0;
00230
00236 virtual RPointerArray<CSenNamespace>& NamespacesL() = 0;
00237
00243 virtual CSenElement* Parent() = 0;
00244
00252 virtual CSenElement* SetParent(CSenElement* apParent) = 0;
00253
00262 virtual CSenElement* DetachL() = 0;
00263
00268 virtual MSenElement& Root() = 0;
00269
00276 virtual CSenElement* Element(const TDesC8& aLocalName) = 0;
00277
00283 virtual CSenElement* Element(const TDesC8& aNsUri,
00284 const TDesC8& aLocalName) = 0;
00285
00299 virtual CSenElement* CreateElementL(const TDesC8& aNsPrefix,
00300 const TDesC8& aLocalName) = 0;
00301
00314 virtual CSenElement& InsertElementL(CSenElement& aInsertedElement,
00315 const CSenElement& aBeforeElement) = 0;
00316
00323 virtual CSenElement& AddElementL(CSenElement& aElement) = 0;
00324
00335 virtual CSenElement& AddElementL(const TDesC8& aNsUri,
00336 const TDesC8& aLocalName) = 0;
00337
00350 virtual CSenElement& AddElementL(const TDesC8& aNsUri,
00351 const TDesC8& aLocalName,
00352 const TDesC8& aQName) = 0;
00353
00366 virtual CSenElement& AddElementL(const TDesC8& aLocalName) = 0;
00367
00375 virtual CSenElement* RemoveElement(CSenElement& aElement) = 0;
00376
00385 virtual CSenElement* RemoveElement( const TDesC8& aNsUri,
00386 const TDesC8& aLocalName) = 0;
00387
00395 virtual CSenElement* RemoveElement(const TDesC8& aLocalName) = 0;
00396
00408 virtual CSenElement* ReplaceElementL(CSenElement& aElement) = 0;
00409
00414 virtual HBufC8* AsXmlL() = 0;
00415
00422 virtual HBufC* AsXmlUnicodeL() = 0;
00423
00429 virtual void WriteAsXMLToL(RWriteStream& aWriteStream) = 0;
00430
00437 virtual void WriteNamespacesToL(RWriteStream& aWriteStream) = 0;
00438
00445 virtual MSenElement* AsElement() = 0;
00446
00452 virtual void CopyFromL(CSenElement& aSource) = 0;
00453
00466 virtual void Set(const TDesC8& aNamespaceURI,
00467 const TDesC8& aLocalName,
00468 const TDesC8& aQName) = 0;
00469
00474 virtual void AddAttributesL(const RAttributeArray& aAttrs) = 0;
00475
00476 };
00477
00478 #endif // M_SEN_ELEMENT_H
00479
00480
00481
00482