williamr@4: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // All text nodes functions williamr@4: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@4: @file williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: #ifndef XMLENGCHARACTERDATA_H williamr@4: #define XMLENGCHARACTERDATA_H williamr@4: williamr@4: #include williamr@4: williamr@4: /** williamr@4: This class represents XML text nodes in the DOM tree. Inherited classes williamr@4: further specialize (e.g. TXmlEngTextNode, TXmlEngComment). williamr@4: williamr@4: The CharacterData Interface is described by the DOM Spec here: williamr@4: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-FF21A306 williamr@2: */ williamr@2: class TXmlEngCharacterData : public TXmlEngNode williamr@2: { williamr@2: public: williamr@2: williamr@4: /** Get contents of the node. williamr@4: @return The content of the node williamr@4: */ williamr@2: IMPORT_C TPtrC8 Contents() const; williamr@2: williamr@2: /** williamr@4: Sets contents of the node. williamr@4: williamr@4: The input is taken as non-escaped: for example, williamr@4: aNewContents = "123 > 34 && P" will be serialized as "123 > 34 && P" williamr@4: williamr@4: @param aNewContents The actual value to store williamr@4: @leave - One of the system-wide error codes williamr@4: */ williamr@2: IMPORT_C void SetContentsL(const TDesC8& aNewContents); williamr@2: williamr@4: /** Append to the contents of the node williamr@4: @param aString Content to be appended williamr@4: @leave KXmlEngErrNullNode Node is NULL williamr@4: @leave - One of the system-wide error codes williamr@4: */ williamr@2: IMPORT_C void AppendContentsL(const TDesC8& aString); williamr@2: williamr@4: /** Get length of the content. williamr@4: @return Number of characters in the contents williamr@4: */ williamr@2: IMPORT_C TUint Length() const; williamr@2: williamr@2: protected: williamr@4: /** Default constructor */ williamr@4: inline TXmlEngCharacterData(); williamr@2: williamr@2: /** williamr@4: Constructor williamr@4: @param aInternal node pointer williamr@4: */ williamr@2: inline TXmlEngCharacterData(void* aInternal); williamr@2: }; williamr@2: williamr@2: williamr@4: #include williamr@2: williamr@4: #endif /* XMLENGCHARACTERDATA_H */ williamr@2: