1//
2// EntityReference.cpp
3//
4// Library: XML
5// Package: DOM
6// Module: DOM
7//
8// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
9// and Contributors.
10//
11// SPDX-License-Identifier: BSL-1.0
12//
13
14
15#include "Poco/DOM/EntityReference.h"
16
17
18namespace Poco {
19namespace XML {
20
21
22EntityReference::EntityReference(Document* pOwnerDocument, const XMLString& name):
23 AbstractNode(pOwnerDocument),
24 _name(name)
25{
26}
27
28
29EntityReference::EntityReference(Document* pOwnerDocument, const EntityReference& ref):
30 AbstractNode(pOwnerDocument, ref),
31 _name(ref._name)
32{
33}
34
35
36EntityReference::~EntityReference()
37{
38}
39
40
41const XMLString& EntityReference::nodeName() const
42{
43 return _name;
44}
45
46
47unsigned short EntityReference::nodeType() const
48{
49 return Node::ENTITY_REFERENCE_NODE;
50}
51
52
53Node* EntityReference::copyNode(bool /*deep*/, Document* pOwnerDocument) const
54{
55 return new EntityReference(pOwnerDocument, *this);
56}
57
58
59} } // namespace Poco::XML
60