QDomEntity 类

QDomEntity class represents an XML entity. 更多...

头: #include <QDomEntity>
qmake: QT += xml
继承: QDomNode

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

公共函数

QDomEntity ()
QDomEntity (const QDomEntity & x )
QDomNode::NodeType nodeType () const
QString notationName () const
QString publicId () const
QString systemId () const
QDomEntity & operator= (const QDomEntity & x )

详细描述

QDomEntity class represents an XML entity.

This class represents an entity in an XML document, either parsed or unparsed. Note that this models the entity itself not the entity declaration.

DOM does not support editing entity nodes; if a user wants to make changes to the contents of an entity, every related QDomEntityReference node must be replaced in the DOM tree by a clone of the entity's contents, and then the desired changes must be made to each of the clones instead. All the descendants of an entity node are read-only.

An entity node does not have any parent.

You can access the entity's publicId (), systemId () 和 notationName () when available.

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

成员函数文档编制

QDomEntity:: QDomEntity ()

Constructs an empty entity.

QDomEntity:: QDomEntity (const QDomEntity & x )

构造副本为 x .

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

QDomNode::NodeType QDomEntity:: nodeType () const

返回 EntityNode .

QString QDomEntity:: notationName () const

For unparsed entities this function returns the name of the notation for the entity. For parsed entities this function returns an empty string.

QString QDomEntity:: publicId () const

Returns the public identifier associated with this entity. If the public identifier was not specified an empty string is returned.

QString QDomEntity:: systemId () const

Returns the system identifier associated with this entity. If the system identifier was not specified an empty string is returned.

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

赋值 x to this DOM entity.

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