xml/xmldomandxpath/inc/xmlenginedom/xmlengcharacterdata.h
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // All text nodes functions
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @file
       
    21  @publishedAll
       
    22  @released
       
    23 */
       
    24 #ifndef XMLENGCHARACTERDATA_H
       
    25 #define XMLENGCHARACTERDATA_H
       
    26 
       
    27 #include <xml/dom/xmlengnode.h>
       
    28 
       
    29 /**
       
    30 This class represents XML text nodes in the DOM tree.  Inherited classes
       
    31 further specialize (e.g. TXmlEngTextNode, TXmlEngComment).
       
    32 
       
    33 The CharacterData Interface is described by the DOM Spec here:
       
    34 http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-FF21A306
       
    35 */
       
    36 class TXmlEngCharacterData : public TXmlEngNode
       
    37 {
       
    38 public:
       
    39 
       
    40     /** Get contents of the node.
       
    41     @return The content of the node
       
    42     */
       
    43     IMPORT_C TPtrC8 Contents() const;
       
    44     
       
    45     /**
       
    46     Sets contents of the node.
       
    47 
       
    48     The input is taken as non-escaped: for example, 
       
    49     aNewContents = "123 > 34 && P" will be serialized as "123 &gt; 34 &amp;&amp; P"
       
    50     
       
    51     @param aNewContents  The actual value to store
       
    52 	@leave - One of the system-wide error codes
       
    53     */
       
    54     IMPORT_C void SetContentsL(const TDesC8& aNewContents);
       
    55 
       
    56     /** Append to the contents of the node
       
    57     @param aString Content to be appended
       
    58 	@leave KXmlEngErrNullNode Node is NULL
       
    59 	@leave - One of the system-wide error codes
       
    60     */
       
    61     IMPORT_C void AppendContentsL(const TDesC8& aString);
       
    62 
       
    63     /** Get length of the content.
       
    64     @return Number of characters in the contents
       
    65     */
       
    66     IMPORT_C TUint Length() const;
       
    67 
       
    68 protected:
       
    69     /** Default constructor */
       
    70 	inline TXmlEngCharacterData(); 
       
    71 
       
    72     /**
       
    73     Constructor
       
    74     @param aInternal node pointer
       
    75     */
       
    76 	inline TXmlEngCharacterData(void* aInternal);
       
    77 };
       
    78 
       
    79 
       
    80 #include <xml/dom/xmlengcharacterdata.inl>
       
    81 
       
    82 #endif /* XMLENGCHARACTERDATA_H */
       
    83