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