1//
2// Comment.h
3//
4// Library: XML
5// Package: DOM
6// Module: DOM
7//
8// Definition of the DOM Comment class.
9//
10// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
11// and Contributors.
12//
13// SPDX-License-Identifier: BSL-1.0
14//
15
16
17#ifndef DOM_Comment_INCLUDED
18#define DOM_Comment_INCLUDED
19
20
21#include "Poco/XML/XML.h"
22#include "Poco/DOM/CharacterData.h"
23#include "Poco/XML/XMLString.h"
24
25
26namespace Poco {
27namespace XML {
28
29
30class XML_API Comment: public CharacterData
31 /// This interface inherits from CharacterData and represents the content of
32 /// a comment, i.e., all the characters between the starting '<!--' and ending
33 /// '-->'. Note that this is the definition of a comment in XML, and, in practice,
34 /// HTML, although some HTML tools may implement the full SGML comment structure.
35{
36public:
37 // Node
38 const XMLString& nodeName() const;
39 unsigned short nodeType() const;
40
41protected:
42 Comment(Document* pOwnerDocument, const XMLString& data);
43 Comment(Document* pOwnerDocument, const Comment& comment);
44 ~Comment();
45
46 Node* copyNode(bool deep, Document* pOwnerDocument) const;
47
48private:
49 static const XMLString NODE_NAME;
50
51 friend class Document;
52};
53
54
55} } // namespace Poco::XML
56
57
58#endif // DOM_Comment_INCLUDED
59