内容表

上一话题

QDomNode

下一话题

QDomNotation

QDomNodeList

QDomNodeList class is a list of QDomNode 对象。 更多

Inheritance diagram of PySide2.QtXml.QDomNodeList

概要

函数

详细描述

Lists can be obtained by elementsByTagName() and 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() .

有关文档对象模型的进一步信息,见 级别 1 and 级别 2 核心 。有关 DOM 实现的更一般介绍,见 QDomDocument 文档编制。

class QDomNodeList

QDomNodeList(arg__1)

param arg__1

QDomNodeList

Creates an empty node list.

PySide2.QtXml.QDomNodeList. at ( index )
参数

index int

返回类型

QDomNode

提供此函数是为 Qt API 一致性。它相当于 item() .

index 为负或者若 index >= length() then a null node is returned (i.e. a node for which isNull() returns true).

PySide2.QtXml.QDomNodeList. count ( )
返回类型

int

提供此函数是为 Qt API 一致性。它相当于 length() .

PySide2.QtXml.QDomNodeList. isEmpty ( )
返回类型

bool

返回 true if the list contains no items; otherwise returns false . This function is provided for Qt API consistency.

PySide2.QtXml.QDomNodeList. item ( index )
参数

index int

返回类型

QDomNode

返回节点在位置 index .

index 为负或者若 index >= length() then a null node is returned (i.e. a node for which isNull() returns true).

另请参阅

length()

PySide2.QtXml.QDomNodeList. length ( )
返回类型

int

返回列表节点数。

PySide2.QtXml.QDomNodeList. __ne__ ( arg__1 )
参数

arg__1 QDomNodeList

返回类型

bool

返回 true the node list n and this node list are not equal; otherwise returns false .

PySide2.QtXml.QDomNodeList. __eq__ ( arg__1 )
参数

arg__1 QDomNodeList

返回类型

bool

返回 true if the node list n and this node list are equal; otherwise returns false .

PySide2.QtXml.QDomNodeList. size ( )
返回类型

int

提供此函数是为 Qt API 一致性。它相当于 length() .