QXmlStreamNamespaceDeclaration Class
The QXmlStreamNamespaceDeclaration class represents a namespace declaration. More…
| Header | #include <QXmlStreamNamespaceDeclaration> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
List of all members, including inherited members
Public Functions
| QXmlStreamNamespaceDeclaration() | |
| QXmlStreamNamespaceDeclaration(const QString &prefix, const QString &namespaceUri) | |
| QStringView | prefix() const |
| QStringView | namespaceUri() const |
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.