• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • dom
dom_xml.cpp
Go to the documentation of this file.
1
24#include "dom/dom_xml.h"
25#include "dom/dom_exception.h"
26#include "xml/dom_textimpl.h"
27#include "xml/dom_xmlimpl.h"
28
29using namespace DOM;
30
31CDATASection::CDATASection()
32{
33}
34
35CDATASection::CDATASection(const CDATASection &) : Text()
36{
37}
38
39CDATASection &CDATASection::operator = (const Node &other)
40{
41 NodeImpl* ohandle = other.handle();
42 if ( impl != ohandle ) {
43 if (!ohandle || ohandle->nodeType() != CDATA_SECTION_NODE) {
44 if ( impl ) impl->deref();
45 impl = 0;
46 } else {
47 Node::operator =(other);
48 }
49 }
50 return *this;
51}
52
53CDATASection &CDATASection::operator = (const CDATASection &other)
54{
55 Node::operator =(other);
56 return *this;
57}
58
59CDATASection::~CDATASection()
60{
61}
62
63CDATASection::CDATASection(CDATASectionImpl *i) : Text(i)
64{
65}
66
67// ----------------------------------------------------------------------------
68Entity::Entity()
69{
70}
71
72Entity::Entity(const Entity &) : Node()
73{
74}
75
76Entity &Entity::operator = (const Node &other)
77{
78 NodeImpl* ohandle = other.handle();
79 if ( impl != ohandle ) {
80 if (!ohandle || ohandle->nodeType() != ENTITY_NODE) {
81 if ( impl ) impl->deref();
82 impl = 0;
83 } else {
84 Node::operator =(other);
85 }
86 }
87 return *this;
88}
89
90Entity &Entity::operator = (const Entity &other)
91{
92 Node::operator =(other);
93 return *this;
94}
95
96Entity::~Entity()
97{
98}
99
100DOMString Entity::publicId() const
101{
102 if (!impl)
103 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
104
105 return ((EntityImpl*)impl)->publicId();
106}
107
108DOMString Entity::systemId() const
109{
110 if (!impl)
111 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
112
113 return ((EntityImpl*)impl)->systemId();
114}
115
116DOMString Entity::notationName() const
117{
118 if (!impl)
119 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
120
121 return ((EntityImpl*)impl)->notationName();
122}
123
124Entity::Entity(EntityImpl *i) : Node(i)
125{
126}
127
128// ----------------------------------------------------------------------------
129
130EntityReference::EntityReference()
131{
132}
133
134EntityReference::EntityReference(const EntityReference &) : Node()
135{
136}
137
138EntityReference &EntityReference::operator = (const Node &other)
139{
140 NodeImpl* ohandle = other.handle();
141 if ( impl != ohandle ) {
142 if (!ohandle || ohandle->nodeType() != ENTITY_REFERENCE_NODE) {
143 if ( impl ) impl->deref();
144 impl = 0;
145 } else {
146 Node::operator =(other);
147 }
148 }
149 return *this;
150}
151
152EntityReference &EntityReference::operator = (const EntityReference &other)
153{
154 Node::operator =(other);
155 return *this;
156}
157
158EntityReference::~EntityReference()
159{
160}
161
162EntityReference::EntityReference(EntityReferenceImpl *i) : Node(i)
163{
164}
165
166// ----------------------------------------------------------------------------
167
168Notation::Notation()
169{
170}
171
172Notation::Notation(const Notation &) : Node()
173{
174}
175
176Notation &Notation::operator = (const Node &other)
177{
178 NodeImpl* ohandle = other.handle();
179 if ( impl != ohandle ) {
180 if (!ohandle || ohandle->nodeType() != NOTATION_NODE) {
181 if ( impl ) impl->deref();
182 impl = 0;
183 } else {
184 Node::operator =(other);
185 }
186 }
187 return *this;
188}
189
190Notation &Notation::operator = (const Notation &other)
191{
192 Node::operator =(other);
193 return *this;
194}
195
196Notation::~Notation()
197{
198}
199
200DOMString Notation::publicId() const
201{
202 if (!impl)
203 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
204
205 return ((NotationImpl*)impl)->publicId();
206}
207
208DOMString Notation::systemId() const
209{
210 if (!impl)
211 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
212
213 return ((NotationImpl*)impl)->systemId();
214}
215
216Notation::Notation(NotationImpl *i) : Node(i)
217{
218}
219
220
221// ----------------------------------------------------------------------------
222
223ProcessingInstruction::ProcessingInstruction()
224{
225}
226
227ProcessingInstruction::ProcessingInstruction(const ProcessingInstruction &)
228 : Node()
229{
230}
231
232ProcessingInstruction &ProcessingInstruction::operator = (const Node &other)
233{
234 NodeImpl* ohandle = other.handle();
235 if ( impl != ohandle ) {
236 if (!ohandle || ohandle->nodeType() != PROCESSING_INSTRUCTION_NODE) {
237 if ( impl ) impl->deref();
238 impl = 0;
239 } else {
240 Node::operator =(other);
241 }
242 }
243 return *this;
244}
245
246ProcessingInstruction &ProcessingInstruction::operator = (const ProcessingInstruction &other)
247{
248 Node::operator =(other);
249 return *this;
250}
251
252ProcessingInstruction::~ProcessingInstruction()
253{
254}
255
256DOMString ProcessingInstruction::target() const
257{
258 if (!impl)
259 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
260
261 return ((ProcessingInstructionImpl*)impl)->target();
262}
263
264DOMString ProcessingInstruction::data() const
265{
266 if (!impl)
267 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
268
269 return ((ProcessingInstructionImpl*)impl)->data();
270}
271
272void ProcessingInstruction::setData( const DOMString &_data )
273{
274 if (!impl)
275 return; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
276
277 int exceptioncode = 0;
278 ((ProcessingInstructionImpl*)impl)->setData(_data, exceptioncode);
279 if (exceptioncode)
280 throw DOMException(exceptioncode);
281}
282
283ProcessingInstruction::ProcessingInstruction(ProcessingInstructionImpl *i) : Node(i)
284{
285}
286
287StyleSheet ProcessingInstruction::sheet() const
288{
289 if (impl) return ((ProcessingInstructionImpl*)impl)->sheet();
290 return 0;
291}
292
293
DOM::CDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: dom_xml.h:67
DOM::CDATASection::~CDATASection
~CDATASection()
Definition: dom_xml.cpp:59
DOM::CDATASection::CDATASection
CDATASection()
Definition: dom_xml.cpp:31
DOM::CDATASection::operator=
CDATASection & operator=(const Node &other)
Definition: dom_xml.cpp:39
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:59
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::EntityReference
EntityReference objects may be inserted into the structure model when an entity reference is in the s...
Definition: dom_xml.h:189
DOM::EntityReference::EntityReference
EntityReference()
Definition: dom_xml.cpp:130
DOM::EntityReference::~EntityReference
~EntityReference()
Definition: dom_xml.cpp:158
DOM::EntityReference::operator=
EntityReference & operator=(const Node &other)
Definition: dom_xml.cpp:138
DOM::Entity
This interface represents an entity, either parsed or unparsed, in an XML document.
Definition: dom_xml.h:125
DOM::Entity::publicId
DOMString publicId() const
The public identifier associated with the entity, if specified.
Definition: dom_xml.cpp:100
DOM::Entity::notationName
DOMString notationName() const
For unparsed entities, the name of the notation for the entity.
Definition: dom_xml.cpp:116
DOM::Entity::Entity
Entity()
Definition: dom_xml.cpp:68
DOM::Entity::systemId
DOMString systemId() const
The system identifier associated with the entity, if specified.
Definition: dom_xml.cpp:108
DOM::Entity::~Entity
~Entity()
Definition: dom_xml.cpp:96
DOM::Entity::operator=
Entity & operator=(const Node &other)
Definition: dom_xml.cpp:76
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:271
DOM::Node::handle
NodeImpl * handle() const
Definition: dom_node.h:925
DOM::Node::operator=
Node & operator=(const Node &other)
Definition: dom_node.cpp:145
DOM::Node::ENTITY_NODE
@ ENTITY_NODE
Definition: dom_node.h:387
DOM::Node::PROCESSING_INSTRUCTION_NODE
@ PROCESSING_INSTRUCTION_NODE
Definition: dom_node.h:388
DOM::Node::NOTATION_NODE
@ NOTATION_NODE
Definition: dom_node.h:393
DOM::Node::CDATA_SECTION_NODE
@ CDATA_SECTION_NODE
Definition: dom_node.h:385
DOM::Node::ENTITY_REFERENCE_NODE
@ ENTITY_REFERENCE_NODE
Definition: dom_node.h:386
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
DOM::Notation
This interface represents a notation declared in the DTD.
Definition: dom_xml.h:223
DOM::Notation::publicId
DOMString publicId() const
The public identifier of this notation.
Definition: dom_xml.cpp:200
DOM::Notation::systemId
DOMString systemId() const
The system identifier of this notation.
Definition: dom_xml.cpp:208
DOM::Notation::Notation
Notation()
Definition: dom_xml.cpp:168
DOM::Notation::~Notation
~Notation()
Definition: dom_xml.cpp:196
DOM::Notation::operator=
Notation & operator=(const Node &other)
Definition: dom_xml.cpp:176
DOM::ProcessingInstruction
The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to ke...
Definition: dom_xml.h:260
DOM::ProcessingInstruction::data
DOMString data() const
The content of this processing instruction.
Definition: dom_xml.cpp:264
DOM::ProcessingInstruction::sheet
StyleSheet sheet() const
Introduced in DOM Level 2 This method is from the LinkStyle interface.
Definition: dom_xml.cpp:287
DOM::ProcessingInstruction::target
DOMString target() const
The target of this processing instruction.
Definition: dom_xml.cpp:256
DOM::ProcessingInstruction::operator=
ProcessingInstruction & operator=(const Node &other)
Definition: dom_xml.cpp:232
DOM::ProcessingInstruction::~ProcessingInstruction
~ProcessingInstruction()
Definition: dom_xml.cpp:252
DOM::ProcessingInstruction::ProcessingInstruction
ProcessingInstruction()
Definition: dom_xml.cpp:223
DOM::ProcessingInstruction::setData
void setData(const DOMString &)
see data
Definition: dom_xml.cpp:272
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:59
DOM::Text
The Text interface represents the textual content (termed character data in XML) of an Element or At...
Definition: dom_text.h:270
dom_exception.h
dom_xml.h
DOM
This library provides a full-featured HTML parser and widget.
Definition: design.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal