QDomNodeList Class Reference

[ QtXml module]

QDomNodeList 类是列表在 QDomNode 对象。 更多...

方法

Special Methods


详细描述

QDomNodeList 类是列表在 QDomNode 对象。

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 ().

有关文档对象模型的进一步信息,见 级别 1 and 级别 2 核心 . For a more general introduction of the DOM implementation see the QDomDocument 文档编制。


方法文档编制

QDomNodeList.__init__ ( self )

Creates an empty node list.

QDomNodeList.__init__ ( self , QDomNodeList )

构造副本为 n .

QDomNode QDomNodeList.at ( self , int  index )

This function is provided for Qt API consistency. It is equivalent to item ().

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

int QDomNodeList.count ( self )

This function is provided for Qt API consistency. It is equivalent to length ().

bool QDomNodeList.isEmpty ( self )

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

QDomNode QDomNodeList.item ( self , int  index )

返回节点在位置 index .

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

另请参阅 length ().

int QDomNodeList.length ( self )

返回列表节点数。

int QDomNodeList.size ( self )

This function is provided for Qt API consistency. It is equivalent to length ().

bool QDomNodeList.__eq__ ( self , QDomNodeList )

QDomNodeList.__len__ ( self )

bool QDomNodeList.__ne__ ( self , QDomNodeList )