6.0.0-rc4Source

QXmlStreamNamespaceDeclaration Class

The QXmlStreamNamespaceDeclaration class represents a namespace declaration. More…

Header#include <QXmlStreamNamespaceDeclaration>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes

List of all members, including inherited members

Public Functions

Detailed Description

A declaration binds a prefix to a namespace URI for an element and what is inside it. QXmlStreamReader::namespaceDeclarations() returns those of a start element.

See also QXmlStreamReader::addExtraNamespaceDeclaration().

Differences from Qt

The declaration holds its strings and does not refer to those of the reader.

Member Function Documentation

QXmlStreamNamespaceDeclaration::QXmlStreamNamespaceDeclaration()

Constructs an empty declaration.

QXmlStreamNamespaceDeclaration::QXmlStreamNamespaceDeclaration(const QString &prefix, const QString &namespaceUri)

Constructs a declaration that binds prefix to namespaceUri. An empty prefix declares the default namespace.

QStringView QXmlStreamNamespaceDeclaration::namespaceUri() const

Returns the namespace URI that the prefix stands for.

QStringView QXmlStreamNamespaceDeclaration::prefix() const

Returns the prefix that the declaration binds, which is empty for the default namespace.