QDomComment 类

QDomComment class represents an XML comment. 更多...

头: #include <QDomComment>
qmake: QT += xml
继承: QDomCharacterData

注意: 此类的所有函数 可重入 .

公共函数

QDomComment ()
QDomComment (const QDomComment & x )
QDomNode::NodeType nodeType () const
QDomComment & operator= (const QDomComment & x )

详细描述

QDomComment class represents an XML comment.

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

<!-- this is a comment -->
					

is represented by QDomComment objects in the parsed Dom tree.

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

成员函数文档编制

QDomComment:: QDomComment ()

构造空注释。要构造带内容的注释,使用 QDomDocument::createComment () 函数。

QDomComment:: QDomComment (const QDomComment & x )

构造副本为 x .

拷贝数据是共享的 (浅拷贝):修改一个节点也将改变另一节点。若想要制作深度副本,使用 cloneNode ().

QDomNode::NodeType QDomComment:: nodeType () const

返回 CommentNode .

QDomComment &QDomComment:: operator= (const QDomComment & x )

赋值 x 到此 DOM 注释。

拷贝数据是共享的 (浅拷贝):修改一个节点也将改变另一节点。若想要制作深度副本,使用 cloneNode ().