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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • 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 
29 using namespace DOM;
30 
31 CDATASection::CDATASection()
32 {
33 }
34 
35 CDATASection::CDATASection(const CDATASection &) : Text()
36 {
37 }
38 
39 CDATASection &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 
53 CDATASection &CDATASection::operator = (const CDATASection &other)
54 {
55  Node::operator =(other);
56  return *this;
57 }
58 
59 CDATASection::~CDATASection()
60 {
61 }
62 
63 CDATASection::CDATASection(CDATASectionImpl *i) : Text(i)
64 {
65 }
66 
67 // ----------------------------------------------------------------------------
68 Entity::Entity()
69 {
70 }
71 
72 Entity::Entity(const Entity &) : Node()
73 {
74 }
75 
76 Entity &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 
90 Entity &Entity::operator = (const Entity &other)
91 {
92  Node::operator =(other);
93  return *this;
94 }
95 
96 Entity::~Entity()
97 {
98 }
99 
100 DOMString 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 
108 DOMString 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 
116 DOMString 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 
124 Entity::Entity(EntityImpl *i) : Node(i)
125 {
126 }
127 
128 // ----------------------------------------------------------------------------
129 
130 EntityReference::EntityReference()
131 {
132 }
133 
134 EntityReference::EntityReference(const EntityReference &) : Node()
135 {
136 }
137 
138 EntityReference &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 
152 EntityReference &EntityReference::operator = (const EntityReference &other)
153 {
154  Node::operator =(other);
155  return *this;
156 }
157 
158 EntityReference::~EntityReference()
159 {
160 }
161 
162 EntityReference::EntityReference(EntityReferenceImpl *i) : Node(i)
163 {
164 }
165 
166 // ----------------------------------------------------------------------------
167 
168 Notation::Notation()
169 {
170 }
171 
172 Notation::Notation(const Notation &) : Node()
173 {
174 }
175 
176 Notation &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 
190 Notation &Notation::operator = (const Notation &other)
191 {
192  Node::operator =(other);
193  return *this;
194 }
195 
196 Notation::~Notation()
197 {
198 }
199 
200 DOMString 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 
208 DOMString 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 
216 Notation::Notation(NotationImpl *i) : Node(i)
217 {
218 }
219 
220 
221 // ----------------------------------------------------------------------------
222 
223 ProcessingInstruction::ProcessingInstruction()
224 {
225 }
226 
227 ProcessingInstruction::ProcessingInstruction(const ProcessingInstruction &)
228  : Node()
229 {
230 }
231 
232 ProcessingInstruction &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 
246 ProcessingInstruction &ProcessingInstruction::operator = (const ProcessingInstruction &other)
247 {
248  Node::operator =(other);
249  return *this;
250 }
251 
252 ProcessingInstruction::~ProcessingInstruction()
253 {
254 }
255 
256 DOMString 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 
264 DOMString 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 
272 void 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 
283 ProcessingInstruction::ProcessingInstruction(ProcessingInstructionImpl *i) : Node(i)
284 {
285 }
286 
287 StyleSheet ProcessingInstruction::sheet() const
288 {
289  if (impl) return ((ProcessingInstructionImpl*)impl)->sheet();
290  return 0;
291 }
292 
293 
DOM::Entity::systemId
DOMString systemId() const
The system identifier associated with the entity, if specified.
Definition: dom_xml.cpp:108
DOM::ProcessingInstruction
The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to ke...
Definition: dom_xml.h:259
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:270
DOM::ProcessingInstruction::ProcessingInstruction
ProcessingInstruction()
Definition: dom_xml.cpp:223
DOM::Entity::notationName
DOMString notationName() const
For unparsed entities, the name of the notation for the entity.
Definition: dom_xml.cpp:116
DOM::Notation::operator=
Notation & operator=(const Node &other)
Definition: dom_xml.cpp:176
DOM::ProcessingInstruction::target
DOMString target() const
The target of this processing instruction.
Definition: dom_xml.cpp:256
DOM::ProcessingInstruction::setData
void setData(const DOMString &)
see data NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
Definition: dom_xml.cpp:272
DOM::ProcessingInstruction::data
DOMString data() const
The content of this processing instruction.
Definition: dom_xml.cpp:264
DOM::Entity
This interface represents an entity, either parsed or unparsed, in an XML document.
Definition: dom_xml.h:124
DOM::Node::operator=
Node & operator=(const Node &other)
Definition: dom_node.cpp:145
DOM::Node::ENTITY_REFERENCE_NODE
Definition: dom_node.h:386
DOM::EntityReference::~EntityReference
~EntityReference()
Definition: dom_xml.cpp:158
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:58
DOM::Entity::Entity
Entity()
Definition: dom_xml.cpp:68
DOM::EntityReference::operator=
EntityReference & operator=(const Node &other)
Definition: dom_xml.cpp:138
DOM::EntityReference
EntityReference objects may be inserted into the structure model when an entity reference is in the s...
Definition: dom_xml.h:188
DOM::Notation::publicId
DOMString publicId() const
The public identifier of this notation.
Definition: dom_xml.cpp:200
DOM::Node::CDATA_SECTION_NODE
Definition: dom_node.h:385
DOM::Notation::Notation
Notation()
Definition: dom_xml.cpp:168
DOM::Entity::publicId
DOMString publicId() const
The public identifier associated with the entity, if specified.
Definition: dom_xml.cpp:100
DOM::Text
The Text interface represents the textual content (termed character data in XML) of an Element or At...
Definition: dom_text.h:269
DOM::ProcessingInstruction::~ProcessingInstruction
~ProcessingInstruction()
Definition: dom_xml.cpp:252
DOM::Notation::systemId
DOMString systemId() const
The system identifier of this notation.
Definition: dom_xml.cpp:208
DOM::ProcessingInstruction::sheet
StyleSheet sheet() const
Introduced in DOM Level 2 This method is from the LinkStyle interface.
Definition: dom_xml.cpp:287
DOM::Entity::~Entity
~Entity()
Definition: dom_xml.cpp:96
DOM::Entity::operator=
Entity & operator=(const Node &other)
Definition: dom_xml.cpp:76
DOM::Node::PROCESSING_INSTRUCTION_NODE
Definition: dom_node.h:388
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::CDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: dom_xml.h:66
dom_exception.h
DOM::CDATASection::~CDATASection
~CDATASection()
Definition: dom_xml.cpp:59
dom_xml.h
DOM::Node::ENTITY_NODE
Definition: dom_node.h:387
DOM::ProcessingInstruction::operator=
ProcessingInstruction & operator=(const Node &other)
Definition: dom_xml.cpp:232
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
DOM::CDATASection::operator=
CDATASection & operator=(const Node &other)
Definition: dom_xml.cpp:39
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:58
DOM::Node::NOTATION_NODE
Definition: dom_node.h:393
DOM::Node::handle
NodeImpl * handle() const
Definition: dom_node.h:925
DOM::CDATASection::CDATASection
CDATASection()
Definition: dom_xml.cpp:31
DOM::Notation
This interface represents a notation declared in the DTD.
Definition: dom_xml.h:222
DOM::EntityReference::EntityReference
EntityReference()
Definition: dom_xml.cpp:130
DOM::Notation::~Notation
~Notation()
Definition: dom_xml.cpp:196
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:20 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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