返回介绍

QDomImplementation Class

发布于 2019-10-04 14:59:48 字数 4658 浏览 1024 评论 0 收藏 0

The QDomImplementation class provides information about the features of the DOM implementation. More...

#include <qdom.h>

List of all member functions.

Public Members

  • QDomImplementation ()
  • QDomImplementation ( constQDomImplementation&x )
  • virtual ~QDomImplementation ()
  • QDomImplementation & operator= ( constQDomImplementation&x )
  • bool operator== ( constQDomImplementation&x ) const
  • bool operator!= ( constQDomImplementation&x ) const
  • virtual bool hasFeature ( constQString&feature, constQString&version )
  • virtual QDomDocumentType createDocumentType ( constQString&qName, constQString&publicId, constQString&systemId )
  • virtual QDomDocument createDocument ( constQString&nsURI, constQString&qName, constQDomDocumentType&doctype )
  • bool isNull ()

Detailed Description

The QDomImplementation class provides information about the features of the DOM implementation.

This class describes the features that are supported by the DOM implementation. Currently only the XML subset of DOM Level 1 and DOM Level 2 Core are supported.

Normally you will use the function QDomDocument::implementation() to get the implementation object.

You can create a new document type with createDocumentType() and a new document with createDocument().

For further information about the Document Object Model see 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 documentation.

See also hasFeature() and XML.


Member Function Documentation

QDomImplementation::QDomImplementation ()

Constructs a QDomImplementation object.

QDomImplementation::QDomImplementation ( constQDomImplementation&x )

Constructs a copy of x.

QDomImplementation::~QDomImplementation () [virtual]

Destroys the object and frees its resources.

QDomDocument QDomImplementation::createDocument ( constQString&nsURI, constQString&qName, constQDomDocumentType&doctype ) [virtual]

Creates a DOM document with the document type doctype. This function also adds a root element node with the qualified name qName and the namespace URI nsURI.

QDomDocumentType QDomImplementation::createDocumentType ( constQString&qName, constQString&publicId, constQString&systemId ) [virtual]

Creates a document type node for the name qName.

publicId specifies the public identifier of the external subset; If you specify QString::null as the publicId, this means that the document type has no public identifier.

Similarly, you specify the system identifier of the external subset with systemId. If you specify QString::null as the systemId, this means that the document type has no system identifier. Since you cannot have a public identifier without a system identifier, the public identifier is set to QString::null if there is no system identifier.

Other features of a document type declaration are not supported by DOM level 2.

The only way you can use a document type that was created this way, is in combination with the createDocument() function to create a QDomDocument with this document type.

See also createDocument().

bool QDomImplementation::hasFeature ( constQString&feature, constQString&version ) [virtual]

The function returns TRUE if QDom implements the requested version of a feature.

Currently only the feature "XML" in version "1.0" is supported.

bool QDomImplementation::isNull ()

Returns FALSE if the object was created by QDomDocument::implementation(); otherwise returns TRUE.

bool QDomImplementation::operator!= ( constQDomImplementation&x ) const

Returns TRUE if x and this DOM implementation object were created from different QDomDocuments.

QDomImplementation& QDomImplementation::operator= ( constQDomImplementation&x )

Assigns x to this DOM implementation.

bool QDomImplementation::operator== ( constQDomImplementation&x ) const

Returns TRUE if x and this DOM implementation object were created from the same QDomDocument.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文