QDomComment Class Reference

[ QtXml module]

QDomComment 类表示 XML 注释。 更多...

继承 QDomCharacterData .

方法


详细描述

QDomComment 类表示 XML 注释。

在剖析 XML 中的注释,譬如这:

 <!-- this is a comment -->
			

is represented by QDomComment objects in the parsed Dom tree.

有关文档对象模型的进一步信息,见 http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM-Level-2-Core/ . For a more general introduction of the DOM implementation see the QDomDocument 文档编制。


方法文档编制

QDomComment.__init__ ( self )

Constructs an empty comment. To construct a comment with content, use the QDomDocument.createComment () 函数。

QDomComment.__init__ ( self , QDomComment   x )

构造副本为 x .

The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode ().

QDomNode.NodeType QDomComment.nodeType ( self )

返回 CommentNode .