PySide6.QtXml.QDomNodeList¶
- class QDomNodeList¶
The
QDomNodeListclass is a list ofQDomNodeobjects. More…Synopsis¶
Methods¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Lists can be obtained by
elementsByTagName()andchildNodes(). 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 bylength().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
QDomDocumentdocumentation.See also
- __init__()¶
Creates an empty node list.
- __init__(nodeList)
- Parameters:
nodeList –
QDomNodeList
Constructs a copy of
nodeList.This function is provided for Qt API consistency. It is equivalent to
item().If
indexis negative or ifindex>=length()then a null node is returned (i.e. a node for whichisNull()returns true).- count()¶
- Return type:
int
This function is provided for Qt API consistency. It is equivalent to
length().- isEmpty()¶
- Return type:
bool
Returns
trueif the list contains no items; otherwise returnsfalse. This function is provided for Qt API consistency.Returns the node at position
index.If
indexis negative or ifindex>=length()then a null node is returned (i.e. a node for whichisNull()returns true).See also
- length()¶
- Return type:
int
Returns the number of nodes in the list.
- __ne__(rhs)¶
- Parameters:
rhs –
QDomNodeList- Return type:
bool
Returns
trueif the node listslhsandrhsare not equal; otherwise returnsfalse.- __eq__(rhs)¶
- Parameters:
rhs –
QDomNodeList- Return type:
bool
Returns
trueif the node listslhsandrhsare equal; otherwise returnsfalse.- size()¶
- Return type:
int
This function is provided for Qt API consistency. It is equivalent to
length().