QXmlStreamAttribute¶
The
QXmlStreamAttribute
class represents a single XML attribute. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
isDefault
()def
name
()def
namespaceUri
()def
prefix
()def
qualifiedName
()def
value
()
Detailed Description¶
An attribute consists of an optionally empty
namespaceUri()
, aname()
, avalue()
, and anisDefault()
attribute.The raw XML attribute name is returned as
qualifiedName()
.
- class PySide2.QtCore.QXmlStreamAttribute¶
PySide2.QtCore.QXmlStreamAttribute(namespaceUri, name, value)
PySide2.QtCore.QXmlStreamAttribute(qualifiedName, value)
PySide2.QtCore.QXmlStreamAttribute(arg__1)
- param namespaceUri:
str
- param qualifiedName:
str
- param name:
str
- param arg__1:
- param value:
str
Creates an empty attribute.
Constructs an attribute in the namespace described with
namespaceUri
withname
and valuevalue
.Constructs an attribute with qualified name
qualifiedName
and valuevalue
.
- PySide2.QtCore.QXmlStreamAttribute.isDefault()¶
- Return type:
bool
Returns
true
if the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returnsfalse
.
- PySide2.QtCore.QXmlStreamAttribute.name()¶
- Return type:
QStringRef
Returns the attribute’s local name.
- PySide2.QtCore.QXmlStreamAttribute.namespaceUri()¶
- Return type:
QStringRef
Returns the attribute’s resolved , or an empty string reference if the attribute does not have a defined namespace.
- PySide2.QtCore.QXmlStreamAttribute.__ne__(other)¶
- Parameters:
- Return type:
bool
Compares this attribute with
other
and returnstrue
if they are not equal; otherwise returnsfalse
.
- PySide2.QtCore.QXmlStreamAttribute.__eq__(other)¶
- Parameters:
- Return type:
bool
Compares this attribute with
other
and returnstrue
if they are equal; otherwise returnsfalse
.
- PySide2.QtCore.QXmlStreamAttribute.prefix()¶
- Return type:
QStringRef
Returns the attribute’s namespace prefix.
See also
- PySide2.QtCore.QXmlStreamAttribute.qualifiedName()¶
- Return type:
QStringRef
Returns the attribute’s qualified name.
A qualified name is the raw name of an attribute in the XML data. It consists of the namespace
prefix()
, followed by colon, followed by the attribute’s localname()
. Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn’t use , but the resolvednamespaceUri()
and the attribute’s localname()
.
- PySide2.QtCore.QXmlStreamAttribute.value()¶
- Return type:
QStringRef
Returns the attribute’s value.
© 2022 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.