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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // All text nodes functions
24 #ifndef XMLENGCHARACTERDATA_H
25 #define XMLENGCHARACTERDATA_H
27 #include <xml/dom/xmlengnode.h>
30 This class represents XML text nodes in the DOM tree. Inherited classes
31 further specialize (e.g. TXmlEngTextNode, TXmlEngComment).
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
36 class TXmlEngCharacterData : public TXmlEngNode
40 /** Get contents of the node.
41 @return The content of the node
43 IMPORT_C TPtrC8 Contents() const;
46 Sets contents of the node.
48 The input is taken as non-escaped: for example,
49 aNewContents = "123 > 34 && P" will be serialized as "123 > 34 && P"
51 @param aNewContents The actual value to store
52 @leave - One of the system-wide error codes
54 IMPORT_C void SetContentsL(const TDesC8& aNewContents);
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
61 IMPORT_C void AppendContentsL(const TDesC8& aString);
63 /** Get length of the content.
64 @return Number of characters in the contents
66 IMPORT_C TUint Length() const;
69 /** Default constructor */
70 inline TXmlEngCharacterData();
74 @param aInternal node pointer
76 inline TXmlEngCharacterData(void* aInternal);
80 #include <xml/dom/xmlengcharacterdata.inl>
82 #endif /* XMLENGCHARACTERDATA_H */