- Qt 6.4
- Qt Core
- C++ Classes
- QXmlStreamNamespaceDeclaration
- Qt 6.4.2 Reference Documentation

# QXmlStreamNamespaceDeclaration Class

The QXmlStreamNamespaceDeclaration class represents a namespace declaration. More...

Header: | #include <QXmlStreamNamespaceDeclaration>
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: | QT += core

- List of all members, including inherited members

Note: All functions in this class are reentrant.

## Public Functions

| QXmlStreamNamespaceDeclaration(const QString &prefix, const QString &namespaceUri)
| QXmlStreamNamespaceDeclaration()
QStringView | namespaceUri() const
QStringView | prefix() const
bool | operator!=(const QXmlStreamNamespaceDeclaration &other) const
bool | operator==(const QXmlStreamNamespaceDeclaration &other) const

## Related Non-Members

| QXmlStreamNamespaceDeclarations

## Detailed Description

An namespace declaration consists of a prefix() and a namespaceUri().

## Member Function Documentation

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

Creates a namespace declaration with prefix and namespaceUri.

### QXmlStreamNamespaceDeclaration::QXmlStreamNamespaceDeclaration()

Creates an empty namespace declaration.

### QStringView QXmlStreamNamespaceDeclaration::namespaceUri() const

Returns the namespaceUri.

### QStringView QXmlStreamNamespaceDeclaration::prefix() const

Returns the prefix.

### bool QXmlStreamNamespaceDeclaration::operator!=(const QXmlStreamNamespaceDeclaration &other) const

Compares this namespace declaration with other and returns `true` if they are not equal; otherwise returns `false`.

### bool QXmlStreamNamespaceDeclaration::operator==(const QXmlStreamNamespaceDeclaration &other) const

Compares this namespace declaration with other and returns `true` if they are equal; otherwise returns `false`.

## Related Non-Members

### QXmlStreamNamespaceDeclarations

Synonym for QList<QXmlStreamNamespaceDeclaration>.