epoc32/include/xml/dom/xmlengcharacterdata.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/xmlengcharacterdata.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /*
     2 * Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:       All text nodes functions
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 #ifndef XMLENGINE_CHARACTERDATA_H_INCLUDED
    25 #define XMLENGINE_CHARACTERDATA_H_INCLUDED
    26 
    27 #include "xmlengnode.h"
    28 
    29 /**
    30 * Instance of TXmlEngCharacterData class represents all kinds of XML text nodes 
    31 * (i.e. text node, comment node) in the DOM tree.
    32 *
    33 * Describe DOM action for nodes that contains text data.
    34 * DOM spec: 
    35 * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-FF21A306
    36 *
    37 * @lib XmlEngineDOM.lib
    38 * @since S60 v3.1
    39 */
    40 class TXmlEngCharacterData : public TXmlEngNode
    41 {
    42 public:
    43 
    44     /**
    45      * Get content of the node.
    46      *
    47      * @since S60 v3.1
    48      * @return String with nodes content
    49      * 
    50      * This method applies to TXmlEngCDATASection, TXmlEngComment and TXmlEngTextNode nodes.
    51      */
    52     IMPORT_C TPtrC8 Contents() const;
    53     
    54     /**
    55      * Sets contents of basic character nodes: TXmlEngTextNode, TXmlEngComment, TXmlEngCDATASection
    56      *
    57      * @since S60 v3.1
    58      * @param aNewContents  The actual value to store
    59      * 
    60      * The input is taken as non-escaped: for example, 
    61      * aNewContents = "123 > 34 && P" will be serialized as "123 &gt; 34 &amp;&amp; P"
    62      * 
    63      * Escaped contents may be set only for TXmlEngElement and TXmlEngAttr nodes.
    64      * @see TXmlEngAttr::SetEscapedValueL(const TDesC8&), TXmlEngElement::SetEscapedTextL(const TDesC8&), 
    65      */
    66     IMPORT_C void SetContentsL(const TDesC8& aNewContents);
    67 
    68     /**
    69      * Extends the contents of the node by appending aString
    70      *
    71      * @since S60 v3.1
    72      * @param aString Content to be added to current content
    73      */
    74     IMPORT_C void AppendContentsL(const TDesC8& aString);
    75 
    76     /**
    77      * Get length of the content
    78      *
    79      * @since S60 v3.1
    80      * @return Number of characters in the contents
    81      */
    82     IMPORT_C TUint Length() const;
    83 
    84 protected:
    85     /**
    86      * Default constructor
    87 	 *
    88      * @since S60 v3.1
    89      */
    90 	inline TXmlEngCharacterData(); // protected from API users
    91 
    92     /**
    93      * Constructor
    94      *
    95      * @since S60 v3.1
    96      * @param aInternal node pointer
    97      */
    98 	inline TXmlEngCharacterData(void* aInternal);
    99 };
   100 
   101 
   102 #include "xmlengcharacterdata.inl"
   103 
   104 #endif /* XMLENGINE_CHARACTERDATA_H_INCLUDED */
   105