Qt 4.8
|
The QDomNodeList class is a list of QDomNode objects. More...
#include <qdom.h>
Public Functions | |
QDomNode | at (int index) const |
This function is provided for Qt API consistency. More... | |
int | count () const |
This function is provided for Qt API consistency. More... | |
bool | isEmpty () const |
Returns true if the list contains no items; otherwise returns false. More... | |
QDomNode | item (int index) const |
Returns the node at position index. More... | |
uint | length () const |
Returns the number of nodes in the list. More... | |
bool | operator!= (const QDomNodeList &) const |
Returns true the node list n and this node list are not equal; otherwise returns false. More... | |
QDomNodeList & | operator= (const QDomNodeList &) |
Assigns n to this node list. More... | |
bool | operator== (const QDomNodeList &) const |
Returns true if the node list n and this node list are equal; otherwise returns false. More... | |
QDomNodeList () | |
Creates an empty node list. More... | |
QDomNodeList (const QDomNodeList &) | |
Constructs a copy of n. More... | |
int | size () const |
This function is provided for Qt API consistency. More... | |
~QDomNodeList () | |
Destroys the object and frees its resources. More... | |
Private Functions | |
QDomNodeList (QDomNodeListPrivate *) | |
Properties | |
QDomNodeListPrivate * | impl |
Friends | |
class | QDomDocument |
class | QDomElement |
class | QDomNode |
The QDomNodeList class is a list of QDomNode objects.
Lists can be obtained by QDomDocument::elementsByTagName() and QDomNode::childNodes(). The Document Object Model (DOM) requires these lists to be "live": whenever you change the underlying document, the contents of the list will get updated.
You can get a particular node from the list with item(). The number of items in the list is returned by length().
For further information about the Document Object Model see Level 1 and Level 2 Core. For a more general introduction of the DOM implementation see the QDomDocument documentation.
QDomNodeList::QDomNodeList | ( | ) |
Creates an empty node list.
QDomNodeList::QDomNodeList | ( | const QDomNodeList & | n | ) |
QDomNodeList::~QDomNodeList | ( | ) |
|
private |
|
inline |
This function is provided for Qt API consistency.
It is equivalent to item().
If index is negative or if index >= length() then a null node is returned (i.e. a node for which QDomNode::isNull() returns true).
Definition at line 265 of file qdom.h.
|
inline |
This function is provided for Qt API consistency.
It is equivalent to length().
Definition at line 269 of file qdom.h.
Referenced by QDBusXmlParser::interfaces(), QDBusXmlParser::object(), QDBusXmlParser::objectTree(), parseAnnotations(), and parseArgs().
|
inline |
Returns true if the list contains no items; otherwise returns false.
This function is provided for Qt API consistency.
Definition at line 271 of file qdom.h.
QDomNode QDomNodeList::item | ( | int | index | ) | const |
Returns the node at position index.
If index is negative or if index >= length() then a null node is returned (i.e. a node for which QDomNode::isNull() returns true).
Definition at line 1410 of file qdom.cpp.
Referenced by QDBusXmlParser::interfaces(), QDBusXmlParser::object(), QDBusXmlParser::objectTree(), parseAnnotations(), and parseArgs().
uint QDomNodeList::length | ( | ) | const |
bool QDomNodeList::operator!= | ( | const QDomNodeList & | n | ) | const |
Returns true the node list n and this node list are not equal; otherwise returns false.
Definition at line 1387 of file qdom.cpp.
QDomNodeList & QDomNodeList::operator= | ( | const QDomNodeList & | n | ) |
bool QDomNodeList::operator== | ( | const QDomNodeList & | n | ) | const |
|
inline |
This function is provided for Qt API consistency.
It is equivalent to length().
Definition at line 270 of file qdom.h.
|
friend |
|
friend |
|
private |
Definition at line 274 of file qdom.h.
Referenced by operator=(), operator==(), and QDomNodeList().