QDomDocumentType Class

The QDomDocumentType class is the representation of the DTD in the document tree. 更多...

头文件: #include <QDomDocumentType>
qmake: QT += xml
基类: QDomNode

Note: All functions in this class are reentrant.

公有函数

QDomDocumentType()
QDomDocumentType(const QDomDocumentType &n)
QDomNamedNodeMap entities() const
QString internalSubset() const
QString name() const
QDomNode::NodeType nodeType() const
QDomNamedNodeMap notations() const
QString publicId() const
QString systemId() const
QDomDocumentType &operator=(const QDomDocumentType &n)

详细描述

The QDomDocumentType class is the representation of the DTD in the document tree.

The QDomDocumentType class allows read-only access to some of the data structures in the DTD: it can return a map of all entities() and notations(). In addition the function name() returns the name of the document type as specified in the &lt;!DOCTYPE name&gt; tag. This class also provides the publicId(), systemId() and internalSubset() functions.

参见 QDomDocument.

成员函数

QDomDocumentType::QDomDocumentType()

Creates an empty QDomDocumentType object.

QDomDocumentType::QDomDocumentType(const QDomDocumentType &n)

Constructs a copy of n.

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

QDomNamedNodeMap QDomDocumentType::entities() const

Returns a map of all entities described in the DTD.

QString QDomDocumentType::internalSubset() const

Returns the internal subset of the document type or an empty string if there is no internal subset.

参见 publicId() and systemId().

QString QDomDocumentType::name() const

Returns the name of the document type as specified in the &lt;!DOCTYPE name&gt; tag.

参见 nodeName().

QDomNode::NodeType QDomDocumentType::nodeType() const

Returns DocumentTypeNode.

参见 isDocumentType() and QDomNode::toDocumentType().

QDomNamedNodeMap QDomDocumentType::notations() const

Returns a map of all notations described in the DTD.

QString QDomDocumentType::publicId() const

Returns the public identifier of the external DTD subset or an empty string if there is no public identifier.

参见 systemId(), internalSubset(), and QDomImplementation::createDocumentType().

QString QDomDocumentType::systemId() const

Returns the system identifier of the external DTD subset or an empty string if there is no system identifier.

参见 publicId(), internalSubset(), and QDomImplementation::createDocumentType().

QDomDocumentType &QDomDocumentType::operator=(const QDomDocumentType &n)

Assigns n to this document type.

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