xmlengelement.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : xmlengelement.h
00004 *  Part of     : XmlEngine / DOM XPath C++ Wrapper
00005 *  Interface   : Domain, XML Engine DOM API
00006 *  Description : Element node functions
00007 *  Version     : %version: 3 %
00008 *
00009 *  Copyright © 2004-2006 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 #ifndef XMLENGINE_ELEMENT_H_INCLUDED
00022 #define XMLENGINE_ELEMENT_H_INCLUDED
00023 
00024 #include "XmlEngAttr.h"
00025 #include "XmlEngNamespace.h"
00026 
00027 template<class T> class RXmlEngNodeList;
00028 
00029 
00110 class TXmlEngElement : public TXmlEngNode
00111 {
00112   public:
00118     inline TXmlEngElement();
00119 
00126     inline TXmlEngElement(void* aInternal);
00127         
00154     IMPORT_C void GetAttributes(RXmlEngNodeList<TXmlEngAttr>& aList) const;
00155 
00169     IMPORT_C void GetChildElements(RXmlEngNodeList<TXmlEngElement>& aList) const;
00170 
00196     IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, const TDesC8& aValue);
00197     
00215     IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName,
00216                                     const TDesC8& aValue, 
00217                                     const TXmlEngNamespace aNsDef);
00218 
00233     IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, 
00234                                     const TDesC8& aValue,
00235                                     const TDesC8& aNsUri, 
00236                                     const TDesC8& aPrefix);
00237 
00256     inline   TXmlEngAttr AddNewAttributeSameNsL(const TDesC8& aName, const TDesC8& aValue);
00257 
00302     IMPORT_C TXmlEngAttr AddNewAttributeUsePrefixL(const TDesC8& aLocalName, 
00303                                              const TDesC8& aValue, 
00304                                              const TDesC8& aPrefix);
00305 
00320     IMPORT_C TXmlEngAttr AddNewAttributeWithNsL(const TDesC8& aLocalName, 
00321                                           const TDesC8& aValue, 
00322                                           const TDesC8& aNsUri);
00323                                           
00338     IMPORT_C TXmlEngAttr AddXmlIdL(const TDesC8& aLocalName,
00339                                        const TDesC8& aValue,
00340                                        TXmlEngNamespace aNs = TXmlEngNamespace());
00341     
00368     IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aName);
00369 
00381     IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aLocalName, TXmlEngNamespace aNsDecl);
00382 
00398     IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aLocalName, 
00399                                      const TDesC8& aNsUri, 
00400                                      const TDesC8& aPrefix);
00401 
00409     IMPORT_C TXmlEngElement AddNewElementSameNsL(const TDesC8& aLocalName);
00410 
00425     IMPORT_C TXmlEngElement AddNewElementUsePrefixL(const TDesC8& aLocalName, const TDesC8& aPrefix);
00426 
00441     IMPORT_C TXmlEngElement AddNewElementWithNsL(const TDesC8& aLocalName, const TDesC8& aNsUri);
00442 
00466     IMPORT_C TXmlEngElement AddNewElementAutoPrefixL(const TDesC8& aLocalName, 
00467                                                const TDesC8& aNsUri, 
00468                                                TXmlEngElement aNsDeclTarget);
00469 
00483     IMPORT_C TPtrC8 Text() const;
00484 
00494     IMPORT_C void  AddTextL(const TDesC8& aString);
00495 
00506     IMPORT_C void  SetTextL(const TDesC8& aString);
00507 
00516     IMPORT_C void  SetEscapedTextL(const TDesC8& aEscapedString);
00517     
00528     IMPORT_C void SetTextNoEncL(const TDesC8& aNotEncString);
00529 
00540         IMPORT_C void AppendTextNoEncL(const TDesC8& aNotEncString);   
00541 
00569     IMPORT_C TXmlEngNamespace AddNamespaceDeclarationL(const TDesC8& aNsUri, const TDesC8& aPrefix);
00570 
00582     IMPORT_C TXmlEngNamespace SetDefaultNamespaceL(const TDesC8& aNsUri);
00583 
00616     IMPORT_C void SetNoDefaultNamespaceL();
00617 
00630     IMPORT_C TXmlEngNamespace LookupNamespaceByPrefixL(const TDesC8& aPrefix) const;
00631 
00717     IMPORT_C TXmlEngNamespace LookupNamespaceByUriL(const TDesC8& aUri) const;
00718 
00741     IMPORT_C TXmlEngNamespace TheXMLNamespaceL() const;
00742 
00754     inline   TXmlEngNamespace DefaultNamespaceL() const;
00755 
00771     IMPORT_C TXmlEngNamespace FindOrCreateNsDeclL(const TDesC8& aNsUri, const TDesC8& aPrefix);
00772 
00783     IMPORT_C TXmlEngNamespace FindOrCreateNsDeclL(const TDesC8& aNsUri);
00784 
00794     IMPORT_C TBool HasNsDeclarationForPrefixL(const TDesC8& aPrefix) const;
00795     
00806     IMPORT_C TXmlEngElement ElementCopyNoChildrenL(TBool preserveNsContext) const;
00807     
00814     inline   TXmlEngElement CopyL() const;
00815 
00821     IMPORT_C void RemoveChildren();
00822 
00828     IMPORT_C void RemoveAttributes();
00829 
00838     IMPORT_C void RemoveNamespaceDeclarations();
00839 
00847     inline   void ClearElement();
00848 
00862     IMPORT_C void CopyAttributesL(TXmlEngElement aSrc);
00863 
00875     IMPORT_C void CopyChildrenL(TXmlEngElement aSrc);
00876 
00885     IMPORT_C void RemoveChildElementsL(const TDesC8& aLocalName,const TDesC8& aNamespaceUri);
00886 
00907     IMPORT_C TPtrC8 AttributeValueL(const TDesC8& aLocalName, 
00908                                     const TDesC8& aNamespaceUri = KNullDesC8) const;
00909 
00920     IMPORT_C void  GetElementsByTagNameL(RXmlEngNodeList<TXmlEngElement>& aList, 
00921                                          const TDesC8& aLocalName, 
00922                                          const TDesC8& aNamespaceUri = KNullDesC8) const;
00923     
00937     IMPORT_C void  SetAttributeL(const TDesC8& aLocalName, 
00938                                  const TDesC8& aValue, 
00939                                  const TDesC8& aNamespaceUri = KNullDesC8, 
00940                                  const TDesC8& aPrefix = KNullDesC8);
00941 
00950     IMPORT_C void  RemoveAttributeL(const TDesC8& aLocalName, 
00951                                     const TDesC8& aNamespaceUri = KNullDesC8);
00952 
00961     IMPORT_C TXmlEngAttr AttributeNodeL(const TDesC8& aLocalName, 
00962                                   const TDesC8& aNamespaceUri = KNullDesC8) const;
00963 
00974     inline     TBool HasAttributeL(const TDesC8& aLocalName, 
00975                                    const TDesC8& aNamespaceUri  = KNullDesC8) const;
00976 
00985     IMPORT_C void  SetAttributeNodeL(TXmlEngAttr aNewAttr);
00986 };
00987 
00988 
00989 
00990 #include "xmlengelement.inl"
00991 
00992 #endif /* XMLENGINE_ELEMENT_H_INCLUDED */

Copyright © Nokia Corporation 2001-2007
Back to top