• 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_node.cpp
Go to the documentation of this file.
1 
23 #include "dom/dom_doc.h"
24 #include "dom/dom_exception.h"
25 #include "dom/dom2_events.h"
26 #include "xml/dom_docimpl.h"
27 #include "xml/dom_elementimpl.h"
28 #include "xml/dom2_eventsimpl.h"
29 
30 #include <QtCore/QRect>
31 
32 using namespace DOM;
33 
34 NamedNodeMap::NamedNodeMap()
35 {
36  impl = 0;
37 }
38 
39 NamedNodeMap::NamedNodeMap(const NamedNodeMap &other)
40 {
41  impl = other.impl;
42  if (impl) impl->ref();
43 }
44 
45 NamedNodeMap::NamedNodeMap(NamedNodeMapImpl *i)
46 {
47  impl = i;
48  if (impl) impl->ref();
49 }
50 
51 NamedNodeMap &NamedNodeMap::operator = (const NamedNodeMap &other)
52 {
53  if ( impl != other.impl ) {
54  if(impl) impl->deref();
55  impl = other.impl;
56  if(impl) impl->ref();
57  }
58  return *this;
59 }
60 
61 NamedNodeMap::~NamedNodeMap()
62 {
63  if(impl) impl->deref();
64 }
65 
66 Node NamedNodeMap::getNamedItem( const DOMString &name ) const
67 {
68  if (!impl) return 0;
69  return impl->getNamedItem(name);
70 }
71 
72 Node NamedNodeMap::setNamedItem( const Node &arg )
73 {
74  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
75 
76  int exceptioncode = 0;
77  Node r = impl->setNamedItem(arg, exceptioncode);
78  if (exceptioncode)
79  throw DOMException(exceptioncode);
80  return r;
81 }
82 
83 Node NamedNodeMap::removeNamedItem( const DOMString &name )
84 {
85  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
86  int exceptioncode = 0;
87  Node r = impl->removeNamedItem(name, exceptioncode);
88  if (exceptioncode)
89  throw DOMException(exceptioncode);
90  return r;
91 }
92 
93 Node NamedNodeMap::item( unsigned long index ) const
94 {
95  if (!impl) return 0;
96  return impl->item(index);
97 }
98 
99 Node NamedNodeMap::getNamedItemNS( const DOMString &namespaceURI, const DOMString &localName ) const
100 {
101  if (!impl) return 0;
102  return impl->getNamedItemNS(namespaceURI, localName);
103 }
104 
105 Node NamedNodeMap::setNamedItemNS( const Node &arg )
106 {
107  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
108  int exceptioncode = 0;
109  Node r = impl->setNamedItemNS(arg, exceptioncode);
110  if (exceptioncode)
111  throw DOMException(exceptioncode);
112  return r;
113 }
114 
115 Node NamedNodeMap::removeNamedItemNS( const DOMString &namespaceURI, const DOMString &localName )
116 {
117  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
118  int exceptioncode = 0;
119  Node r = impl->removeNamedItemNS(namespaceURI, localName, exceptioncode);
120  if (exceptioncode)
121  throw DOMException(exceptioncode);
122  return r;
123 }
124 
125 unsigned long NamedNodeMap::length() const
126 {
127  if (!impl) return 0;
128  return impl->length();
129 }
130 
131 // ---------------------------------------------------------------------------
132 
133 Node::Node(const Node &other)
134 {
135  impl = other.impl;
136  if(impl) impl->ref();
137 }
138 
139 Node::Node( NodeImpl *i )
140 {
141  impl = i;
142  if(impl) impl->ref();
143 }
144 
145 Node &Node::operator = (const Node &other)
146 {
147  if(impl != other.impl) {
148  if(impl) impl->deref();
149  impl = other.impl;
150  if(impl) impl->ref();
151  }
152  return *this;
153 }
154 
155 bool Node::operator == (const Node &other) const
156 {
157  return (impl == other.impl);
158 }
159 
160 bool Node::operator != (const Node &other) const
161 {
162  return !(impl == other.impl);
163 }
164 
165 Node::~Node()
166 {
167  if(impl) impl->deref();
168 }
169 
170 DOMString Node::nodeName() const
171 {
172  if(impl) return impl->nodeName();
173  return DOMString();
174 }
175 
176 DOMString Node::nodeValue() const
177 {
178  // ### should throw exception on plain node ?
179  if(impl) return impl->nodeValue();
180  return DOMString();
181 }
182 
183 void Node::setNodeValue( const DOMString &_str )
184 {
185  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
186 
187  int exceptioncode = 0;
188  if(impl) impl->setNodeValue( _str,exceptioncode );
189  if (exceptioncode)
190  throw DOMException(exceptioncode);
191 }
192 
193 unsigned short Node::nodeType() const
194 {
195  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
196  return impl->nodeType();
197 }
198 
199 Node Node::parentNode() const
200 {
201  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
202  return impl->parentNode();
203 }
204 
205 NodeList Node::childNodes() const
206 {
207  if (!impl) return 0;
208  return impl->childNodes().get();
209 }
210 
211 Node Node::firstChild() const
212 {
213  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
214  return impl->firstChild();
215 }
216 
217 Node Node::lastChild() const
218 {
219  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
220  return impl->lastChild();
221 }
222 
223 Node Node::previousSibling() const
224 {
225  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
226  return impl->previousSibling();
227 }
228 
229 Node Node::nextSibling() const
230 {
231  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
232  return impl->nextSibling();
233 }
234 
235 NamedNodeMap Node::attributes() const
236 {
237  if (!impl || !impl->isElementNode()) return 0;
238  return static_cast<ElementImpl*>(impl)->attributes();
239 }
240 
241 Document Node::ownerDocument() const
242 {
243  if (!impl || !impl->ownerDocument())
244  return Document(false);
245  return impl->ownerDocument();
246 }
247 
248 Node Node::insertBefore( const Node &newChild, const Node &refChild )
249 {
250  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
251  int exceptioncode = 0;
252  NodeImpl *r = impl->insertBefore( newChild.impl, refChild.impl, exceptioncode );
253  if (exceptioncode)
254  throw DOMException(exceptioncode);
255  return r;
256 }
257 
258 Node Node::replaceChild( const Node &newChild, const Node &oldChild )
259 {
260  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
261  int exceptioncode = 0;
262  impl->replaceChild( newChild.impl, oldChild.impl, exceptioncode );
263  if (exceptioncode)
264  throw DOMException(exceptioncode);
265  return oldChild;
266 }
267 
268 Node Node::removeChild( const Node &oldChild )
269 {
270  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
271  int exceptioncode = 0;
272  impl->removeChild( oldChild.impl, exceptioncode );
273  if (exceptioncode)
274  throw DOMException(exceptioncode);
275 
276  return oldChild;
277 }
278 
279 Node Node::appendChild( const Node &newChild )
280 {
281  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
282  int exceptioncode = 0;
283  NodeImpl *r = impl->appendChild( newChild.impl, exceptioncode );
284  if (exceptioncode)
285  throw DOMException(exceptioncode);
286  return r;
287 }
288 
289 bool Node::hasAttributes()
290 {
291  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
292  return impl->hasAttributes();
293 }
294 
295 bool Node::hasChildNodes( )
296 {
297  if (!impl) return false;
298  return impl->hasChildNodes();
299 }
300 
301 Node Node::cloneNode( bool deep )
302 {
303  if (!impl) return 0;
304  return impl->cloneNode( deep ).get();
305 }
306 
307 void Node::normalize ( )
308 {
309  if (!impl) return;
310  impl->normalize();
311 }
312 
313 bool Node::isSupported( const DOMString &feature,
314  const DOMString &version ) const
315 {
316  return NodeImpl::isSupported(feature, version);
317 }
318 
319 DOMString Node::namespaceURI( ) const
320 {
321  if (!impl) return DOMString();
322  return impl->namespaceURI();
323 }
324 
325 DOMString Node::prefix( ) const
326 {
327  if (!impl) return DOMString();
328  return impl->prefix();
329 }
330 
331 void Node::setPrefix(const DOMString &prefix )
332 {
333  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
334  int exceptioncode = 0;
335  impl->setPrefix(prefix,exceptioncode);
336  if (exceptioncode)
337  throw DOMException(exceptioncode);
338 }
339 
340 DOMString Node::localName( ) const
341 {
342  if (!impl) return DOMString();
343  return impl->localName();
344 }
345 
346 void Node::addEventListener(const DOMString &type,
347  EventListener *listener,
348  const bool useCapture)
349 {
350  if (!impl) return;
351  if (listener)
352  impl->addEventListener(EventName::fromString(type),listener,useCapture);
353 }
354 
355 void Node::removeEventListener(const DOMString &type,
356  EventListener *listener,
357  bool useCapture)
358 {
359  if (!impl) return;
360  impl->removeEventListener(EventName::fromString(type),listener,useCapture);
361 }
362 
363 bool Node::dispatchEvent(const Event &evt)
364 {
365  if (!impl)
366  throw DOMException(DOMException::INVALID_STATE_ERR);
367 
368  if (!evt.handle())
369  throw DOMException(DOMException::NOT_FOUND_ERR);
370 
371  int exceptioncode = 0;
372  impl->dispatchEvent(evt.handle(),exceptioncode);
373  if (exceptioncode)
374  throw DOMException(exceptioncode);
375  return !evt.handle()->defaultPrevented();
376 }
377 
378 DOMString Node::textContent() const
379 {
380  if (!impl) return DOMString();
381  return impl->textContent();
382 }
383 
384 void Node::setTextContent(const DOMString& content)
385 {
386  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
387  int exceptioncode = 0;
388  impl->setTextContent(content, exceptioncode);
389  if (exceptioncode)
390  throw DOMException(exceptioncode);
391 }
392 
393 unsigned Node::compareDocumentPosition(const Node& other)
394 {
395  if (!impl || !other.impl)
396  throw DOMException(DOMException::NOT_FOUND_ERR);
397  return impl->compareDocumentPosition(other.impl);
398 }
399 
400 unsigned int Node::elementId() const
401 {
402  if (!impl) return 0;
403  return impl->id();
404 }
405 
406 unsigned long Node::index() const
407 {
408  if (!impl) return 0;
409  return impl->nodeIndex();
410 }
411 
412 #ifndef KDE_NO_DEPRECATED
413 QString Node::toHTML()
414 {
415  if (!impl) return QString();
416  return impl->toString().string();
417 }
418 #endif
419 
420 void Node::applyChanges()
421 {
422  if (!impl) return;
423  impl->recalcStyle( NodeImpl::Inherit );
424 }
425 
426 #ifndef KDE_NO_DEPRECATED
427 void Node::getCursor(int offset, int &_x, int &_y, int &height)
428 {
429  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
430  int dummy;
431  impl->getCaret(offset, false, _x, _y, dummy, height);
432 }
433 #endif
434 
435 QRect Node::getRect()
436 {
437  if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
438  return impl->getRect();
439 }
440 
441 //-----------------------------------------------------------------------------
442 
443 NodeList::NodeList()
444 {
445  impl = 0;
446 }
447 
448 NodeList::NodeList(const NodeList &other)
449 {
450  impl = other.impl;
451  if(impl) impl->ref();
452 }
453 
454 NodeList::NodeList(const NodeListImpl *i)
455 {
456  impl = const_cast<NodeListImpl *>(i);
457  if(impl) impl->ref();
458 }
459 
460 NodeList &NodeList::operator = (const NodeList &other)
461 {
462  if ( impl != other.impl ) {
463  if(impl) impl->deref();
464  impl = other.impl;
465  if(impl) impl->ref();
466  }
467  return *this;
468 }
469 
470 NodeList::~NodeList()
471 {
472  if(impl) impl->deref();
473 }
474 
475 Node NodeList::item( unsigned long index ) const
476 {
477  if (!impl) return 0;
478  return impl->item(index);
479 }
480 
481 unsigned long NodeList::length() const
482 {
483  if (!impl) return 0;
484  return impl->length();
485 }
486 
487 //-----------------------------------------------------------------------------
488 
489 DOMString DOMException::codeAsString() const
490 {
491  return codeAsString(code);
492 }
493 
494 DOMString DOMException::codeAsString(int code)
495 {
496  switch ( code ) {
497  case INDEX_SIZE_ERR:
498  return DOMString( "INDEX_SIZE_ERR" );
499  case DOMSTRING_SIZE_ERR:
500  return DOMString( "DOMSTRING_SIZE_ERR" );
501  case HIERARCHY_REQUEST_ERR:
502  return DOMString( "HIERARCHY_REQUEST_ERR" );
503  case WRONG_DOCUMENT_ERR:
504  return DOMString( "WRONG_DOCUMENT_ERR" );
505  case INVALID_CHARACTER_ERR:
506  return DOMString( "INVALID_CHARACTER_ERR" );
507  case NO_DATA_ALLOWED_ERR:
508  return DOMString( "NO_DATA_ALLOWED_ERR" );
509  case NO_MODIFICATION_ALLOWED_ERR:
510  return DOMString( "NO_MODIFICATION_ALLOWED_ERR" );
511  case NOT_FOUND_ERR:
512  return DOMString( "NOT_FOUND_ERR" );
513  case NOT_SUPPORTED_ERR:
514  return DOMString( "NOT_SUPPORTED_ERR" );
515  case INUSE_ATTRIBUTE_ERR:
516  return DOMString( "INUSE_ATTRIBUTE_ERR" );
517  case INVALID_STATE_ERR:
518  return DOMString( "INVALID_STATE_ERR" );
519  case SYNTAX_ERR:
520  return DOMString( "SYNTAX_ERR" );
521  case INVALID_MODIFICATION_ERR:
522  return DOMString( "INVALID_MODIFICATION_ERR" );
523  case NAMESPACE_ERR:
524  return DOMString( "NAMESPACE_ERR" );
525  case INVALID_ACCESS_ERR:
526  return DOMString( "INVALID_ACCESS_ERR" );
527  case VALIDATION_ERR:
528  return DOMString( "VALIDATION_ERR" );
529  case TYPE_MISMATCH_ERR:
530  return DOMString( "TYPE_MISMATCH_ERR" );
531  case SECURITY_ERR:
532  return DOMString( "SECURITY_ERR" );
533  case NETWORK_ERR:
534  return DOMString( "NETWORK_ERR" );
535  case ABORT_ERR:
536  return DOMString( "ABORT_ERR" );
537  case URL_MISMATCH_ERR:
538  return DOMString( "URL_MISMATCH_ERR" );
539  case QUOTA_EXCEEDED_ERR:
540  return DOMString( "QUOTA_EXCEEDED_ERR" );
541  case TIMEOUT_ERR:
542  return DOMString( "TIMEOUT_ERR" );
543  case NOT_READABLE_ERR:
544  return DOMString( "NOT_READABLE_ERR" );
545  case DATA_CLONE_ERR:
546  return DOMString( "DATA_CLONE_ERR" );
547  case ENCODING_ERR:
548  return DOMString( "ENCODING_ERR" );
549  default:
550  return DOMString( "(unknown exception code)" );
551  }
552 }
553 
554 bool DOMException::isDOMExceptionCode(int exceptioncode)
555 {
556  return exceptioncode < 100;
557 }
558 
DOM::DOMException::NOT_FOUND_ERR
Definition: dom_exception.h:80
DOM::DOMException::SYNTAX_ERR
Definition: dom_exception.h:84
DOM::NamedNodeMap::getNamedItemNS
Node getNamedItemNS(const DOMString &namespaceURI, const DOMString &localName) const
Introduced in DOM Level 2.
Definition: dom_node.cpp:99
DOM::Node::applyChanges
void applyChanges()
Definition: dom_node.cpp:420
DOM::Node::compareDocumentPosition
unsigned compareDocumentPosition(const DOM::Node &other)
Introduced in DOM Level 3.
Definition: dom_node.cpp:393
DOM::Node::lastChild
Node lastChild() const
The last child of this node.
Definition: dom_node.cpp:217
DOM::DOMException::DATA_CLONE_ERR
Definition: dom_exception.h:97
dom_doc.h
DOM::Node::textContent
DOMString textContent() const
Introduced in DOM Level 3.
Definition: dom_node.cpp:378
DOM::Node::insertBefore
Node insertBefore(const Node &newChild, const Node &refChild)
Inserts the node newChild before the existing child node refChild .
Definition: dom_node.cpp:248
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:270
DOM::Node::dispatchEvent
bool dispatchEvent(const Event &evt)
Introduced in DOM Level 2 This method is from the EventTarget interface.
Definition: dom_node.cpp:363
DOM::Node::nodeName
DOMString nodeName() const
The name of this node, depending on its type; see the table above.
Definition: dom_node.cpp:170
DOM::NamedNodeMap::removeNamedItem
Node removeNamedItem(const DOMString &name)
Removes a node specified by name.
Definition: dom_node.cpp:83
DOM::Node::prefix
DOMString prefix() const
Introduced in DOM Level 2.
Definition: dom_node.cpp:325
DOM::Node::previousSibling
Node previousSibling() const
The node immediately preceding this node.
Definition: dom_node.cpp:223
DOM::Node::setNodeValue
void setNodeValue(const DOMString &)
see nodeValue NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
Definition: dom_node.cpp:183
DOM::Node::appendChild
Node appendChild(const Node &newChild)
Adds the node newChild to the end of the list of children of this node.
Definition: dom_node.cpp:279
DOM::Node::setTextContent
void setTextContent(const DOMString &text)
see textContent()
Definition: dom_node.cpp:384
DOM::DOMException::SECURITY_ERR
Definition: dom_exception.h:90
DOM::DOMException::NAMESPACE_ERR
Definition: dom_exception.h:86
DOM::Node::removeEventListener
void removeEventListener(const DOMString &type, EventListener *listener, bool useCapture)
Introduced in DOM Level 2 This method is from the EventTarget interface.
Definition: dom_node.cpp:355
DOM::DOMException::NO_DATA_ALLOWED_ERR
Definition: dom_exception.h:78
DOM::Node::operator!=
bool operator!=(const Node &other) const
Definition: dom_node.cpp:160
DOM::NodeList::impl
NodeListImpl * impl
Definition: dom_node.h:1011
DOM::DOMException::INVALID_ACCESS_ERR
Definition: dom_exception.h:87
DOM::DOMException::INVALID_MODIFICATION_ERR
Definition: dom_exception.h:85
DOM::Node::getCursor
void getCursor(int offset, int &_x, int &_y, int &height)
Definition: dom_node.cpp:427
DOM::DOMException::INVALID_CHARACTER_ERR
Definition: dom_exception.h:77
DOM::Node::getRect
QRect getRect()
not part of the DOM.
Definition: dom_node.cpp:435
DOM::DOMException::ENCODING_ERR
Definition: dom_exception.h:98
DOM::Node::attributes
NamedNodeMap attributes() const
A NamedNodeMap containing the attributes of this node (if it is an Element ) or null otherwise...
Definition: dom_node.cpp:235
QString
DOM::Node::hasChildNodes
bool hasChildNodes()
This is a convenience method to allow easy determination of whether a node has any children...
Definition: dom_node.cpp:295
DOM::DOMException::TIMEOUT_ERR
Definition: dom_exception.h:95
DOM::Node::index
unsigned long index() const
Definition: dom_node.cpp:406
DOM::Node::operator=
Node & operator=(const Node &other)
Definition: dom_node.cpp:145
DOM::Node::toHTML
QString toHTML()
Definition: dom_node.cpp:413
DOM::DOMException::VALIDATION_ERR
Definition: dom_exception.h:88
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:58
DOM::Node::replaceChild
Node replaceChild(const Node &newChild, const Node &oldChild)
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node...
Definition: dom_node.cpp:258
DOM::DOMException::NOT_SUPPORTED_ERR
Definition: dom_exception.h:81
DOM::Node::Node
Node()
Definition: dom_node.h:278
DOM::DOMException::ABORT_ERR
Definition: dom_exception.h:92
DOM::Node::childNodes
NodeList childNodes() const
A NodeList that contains all children of this node.
Definition: dom_node.cpp:205
DOM::NamedNodeMap
Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can b...
Definition: dom_node.h:62
DOM::DOMException::URL_MISMATCH_ERR
Definition: dom_exception.h:93
DOM::Node::isSupported
bool isSupported(const DOMString &feature, const DOMString &version) const
Introduced in DOM Level 2.
Definition: dom_node.cpp:313
DOM::Event::handle
EventImpl * handle() const
Definition: dom2_events.cpp:166
DOM::Node::parentNode
Node parentNode() const
The parent of this node.
Definition: dom_node.cpp:199
DOM::DOMException::NOT_READABLE_ERR
Definition: dom_exception.h:96
DOM::DOMException::INDEX_SIZE_ERR
Definition: dom_exception.h:73
DOM::DOMException::codeAsString
DOMString codeAsString() const
Returns the name of this error.
Definition: dom_node.cpp:489
DOM::DOMException::INUSE_ATTRIBUTE_ERR
Definition: dom_exception.h:82
DOM::NodeList::item
Node item(unsigned long index) const
Returns the index th item in the collection.
Definition: dom_node.cpp:475
DOM::Node::localName
DOMString localName() const
Introduced in DOM Level 2.
Definition: dom_node.cpp:340
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::Node::nodeValue
DOMString nodeValue() const
The value of this node, depending on its type; see the table above.
Definition: dom_node.cpp:176
DOM::Node::removeChild
Node removeChild(const Node &oldChild)
Removes the child node indicated by oldChild from the list of children, and returns it...
Definition: dom_node.cpp:268
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:245
dom_exception.h
DOM::Node::ownerDocument
Document ownerDocument() const
The Document object associated with this node.
Definition: dom_node.cpp:241
DOM::Node::addEventListener
void addEventListener(const DOMString &type, EventListener *listener, const bool useCapture)
Introduced in DOM Level 2 This method is from the EventTarget interface.
Definition: dom_node.cpp:346
DOM::NamedNodeMap::setNamedItemNS
Node setNamedItemNS(const Node &arg)
Introduced in DOM Level 2.
Definition: dom_node.cpp:105
DOM::Node::cloneNode
Node cloneNode(bool deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
Definition: dom_node.cpp:301
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
DOM::DOMException::QUOTA_EXCEEDED_ERR
Definition: dom_exception.h:94
DOM::DOMException::WRONG_DOCUMENT_ERR
Definition: dom_exception.h:76
DOM::NamedNodeMap::item
Node item(unsigned long index) const
Returns the index th item in the map.
Definition: dom_node.cpp:93
DOM::Node::~Node
virtual ~Node()
Definition: dom_node.cpp:165
DOM::Node::normalize
void normalize()
Modified in DOM Level 2.
Definition: dom_node.cpp:307
DOM::Node::firstChild
Node firstChild() const
The first child of this node.
Definition: dom_node.cpp:211
DOM::DOMException::code
unsigned short code
Definition: dom_exception.h:100
DOM::NodeList
The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
Definition: dom_node.h:963
DOM::EventListener
Introduced in DOM Level 2.
Definition: dom2_events.h:70
DOM::NamedNodeMap::impl
NamedNodeMapImpl * impl
Definition: dom_node.h:234
DOM::Event
Introduced in DOM Level 2.
Definition: dom2_events.h:117
DOM::NamedNodeMap::getNamedItem
Node getNamedItem(const DOMString &name) const
Retrieves a node specified by name.
Definition: dom_node.cpp:66
DOM::DOMException::TYPE_MISMATCH_ERR
Definition: dom_exception.h:89
dom2_events.h
QRect
DOM::NamedNodeMap::NamedNodeMap
NamedNodeMap()
Definition: dom_node.cpp:34
DOM::DOMException::NO_MODIFICATION_ALLOWED_ERR
Definition: dom_exception.h:79
DOM::NamedNodeMap::operator=
NamedNodeMap & operator=(const NamedNodeMap &other)
Definition: dom_node.cpp:51
DOM::Node::operator==
bool operator==(const Node &other) const
Definition: dom_node.cpp:155
DOM::NamedNodeMap::~NamedNodeMap
~NamedNodeMap()
Definition: dom_node.cpp:61
DOM::NodeList::NodeList
NodeList()
Definition: dom_node.cpp:443
DOM::NamedNodeMap::length
unsigned long length() const
The number of nodes in the map.
Definition: dom_node.cpp:125
DOM::NodeList::~NodeList
~NodeList()
Definition: dom_node.cpp:470
DOM::Node::namespaceURI
DOMString namespaceURI() const
Introduced in DOM Level 2.
Definition: dom_node.cpp:319
DOM::Node::hasAttributes
bool hasAttributes()
Returns whether this node (if it is an element) has any attributes.
Definition: dom_node.cpp:289
DOM::DOMException::isDOMExceptionCode
static bool isDOMExceptionCode(int exceptioncode)
Definition: dom_node.cpp:554
DOM::NodeList::operator=
NodeList & operator=(const NodeList &other)
Definition: dom_node.cpp:460
DOM::Node::elementId
quint32 elementId() const
Definition: dom_node.cpp:400
DOM::DOMException::INVALID_STATE_ERR
Definition: dom_exception.h:83
DOM::Node::setPrefix
void setPrefix(const DOMString &prefix)
see prefix
Definition: dom_node.cpp:331
DOM::NamedNodeMap::removeNamedItemNS
Node removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName)
Introduced in DOM Level 2.
Definition: dom_node.cpp:115
DOM::Node::nextSibling
Node nextSibling() const
The node immediately following this node.
Definition: dom_node.cpp:229
DOM::DOMException::DOMSTRING_SIZE_ERR
Definition: dom_exception.h:74
DOM::DOMException::NETWORK_ERR
Definition: dom_exception.h:91
DOM::NamedNodeMap::setNamedItem
Node setNamedItem(const Node &arg)
Adds a node using its nodeName attribute.
Definition: dom_node.cpp:72
DOM::DOMException::HIERARCHY_REQUEST_ERR
Definition: dom_exception.h:75
DOM::NodeList::length
unsigned long length() const
The number of nodes in the list.
Definition: dom_node.cpp:481
DOM::Node::nodeType
unsigned short nodeType() const
A code representing the type of the underlying object, as defined above.
Definition: dom_node.cpp:193
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