이 페이지에서

QXmlStreamAttribute Class

QXmlStreamAttribute 클래스는 단일 XML 속성을 나타냅니다. 더 보기...

헤더: #include <QXmlStreamAttribute>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

참고: 이 클래스의 모든 함수는 재진입 가능합니다.

QXmlStreamAttribute 비교

범주비교 가능한 유형
동등성QXmlStreamAttribute

공개 함수

QXmlStreamAttribute()
QXmlStreamAttribute(const QString &qualifiedName, const QString &value)
QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value)
bool isDefault() const
QStringView name() const
QStringView namespaceUri() const
QStringView prefix() const
QStringView qualifiedName() const
QStringView value() const
bool operator!=(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)
bool operator==(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)

상세 설명

속성은 선택적으로 비어 있을 수 있는 namespaceUri(), name(), value() 및 isDefault() 속성으로 구성됩니다.

원시 XML 속성 이름은 qualifiedName()으로 반환됩니다.

멤버 함수 설명서

QXmlStreamAttribute::QXmlStreamAttribute()

빈 속성을 생성합니다.

QXmlStreamAttribute::QXmlStreamAttribute(const QString &qualifiedName, const QString &value)

qualifiedName 라는 정규화된 이름을 가지며, 값이 value 인 속성을 생성합니다.

이 속성의 isDefault() 값은 false 와 동일합니다.

QXmlStreamAttribute::QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value)

namespaceUri 로 정의된 네임스페이스 내에, name 및 값 value 을 갖는 속성을 생성합니다.

이 속성의 isDefault() 값은 false 과 동일합니다.

bool QXmlStreamAttribute::isDefault() const

파서가 DTD의 ATTLIST 선언에 따라 이 속성을 기본값과 함께 추가한 경우 ` true `를 반환하고, 그렇지 않은 경우 ` false`를 반환합니다.

QStringView QXmlStreamAttribute::name() const

속성의 로컬 이름을 반환합니다.

QStringView QXmlStreamAttribute::namespaceUri() const

속성의 해결된 네임스페이스 URI를 반환하거나, 속성에 정의된 네임스페이스가 없는 경우 빈 문자열 참조를 반환합니다.

QStringView QXmlStreamAttribute::prefix() const

속성의 네임스페이스 접두사를 반환합니다.

name() 및 qualifiedName()도 참조하십시오 .

QStringView QXmlStreamAttribute::qualifiedName() const

속성의 정규화된 이름을 반환합니다.

정규화된 이름은 XML 데이터 내 속성의 원시 이름입니다. 이는 네임스페이스 prefix()로 시작하여 콜론(:)이 뒤따르고, 그 뒤에 속성의 로컬 이름 name()이 오는 형태로 구성됩니다. 네임스페이스 접두사는 고유하지 않으므로(동일한 접두사가 서로 다른 네임스페이스를 가리킬 수 있고, 서로 다른 접두사가 동일한 네임스페이스를 가리킬 수 있음), qualifiedName()을 사용해서는 안 되며, 대신 resolved namespaceUri()와 속성의 로컬 name()를 사용해야 합니다.

QStringView QXmlStreamAttribute::value() const

속성의 값을 반환합니다.

관련 비회원

[noexcept] bool operator!=(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)

lhs 속성과 rhs 을 비교하여, 둘이 같지 않을 경우 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

[noexcept] bool operator==(const QXmlStreamAttribute &lhs, const QXmlStreamAttribute &rhs)

lhs 속성과 rhs 를 비교하여, 둘이 같으면 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.