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 // Text node functions
27 #include <xml/dom/xmlengcharacterdata.h>
31 The TXmlEngTextNode class inherits from TXmlEngCharacterData and represents the
32 textual content (termed "character data" in XML) of an Element or TXmlEngAttr.
34 If there is no markup inside an element's content, the text is contained in a
35 single TXmlEngTextNode that is the only child of the element. If there is
36 markup, it is parsed into the information items (elements, comments, etc.) and
37 the TXmlEngTextNode nodes that form the list of children of the element.
39 When a document is first made available via the DOM, there is only one
40 TXmlEngTextNode node for each block of text. Users may create adjacent
41 TXmlEngTextNode nodes that represent the contents of a given element without
42 any intervening markup, but should be aware that there is no way to represent
43 the separations between these nodes in XML or HTML, so they will not (in
44 general) persist between DOM editing sessions.
46 No lexical check is done on the content of a TXmlEngTextNode node and depending
47 on its position in the document, some characters must be escaped during
48 serialization using character references. For example, the characters "<&" if
49 the textual content is part of an element or an attribute, the character
50 sequence "]]>" when part of an element, the quotation mark character " or the
51 apostrophe character ' when part of an attribute.
53 @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1312295772
55 class TXmlEngTextNode : public TXmlEngCharacterData
58 /** Default constructor */
59 inline TXmlEngTextNode();
62 Check if the element content is whitespace. Whitespace may be an empty element,
63 or the characters space, tab, LF, or CR.
64 @return ETrue if the element content only contains whitespace, EFalse otherwise
66 IMPORT_C TBool IsElementContentWhitespace() const;
71 @param aInternal Text node pointer
73 inline TXmlEngTextNode(void* aInternal);
77 #include <xml/dom/xmlengtext.inl>
79 #endif /* XMLENGTEXT_H */