QXmlStreamAttribute#

The QXmlStreamAttribute class represents a single XML attribute. More

Synopsis#

Functions#

Detailed Description#

An attribute consists of an optionally empty namespaceUri() , a name() , a value() , and an isDefault() attribute.

The raw XML attribute name is returned as qualifiedName() .

class PySide6.QtCore.QXmlStreamAttribute#

PySide6.QtCore.QXmlStreamAttribute(namespaceUri, name, value)

PySide6.QtCore.QXmlStreamAttribute(qualifiedName, value)

PySide6.QtCore.QXmlStreamAttribute(QXmlStreamAttribute)

Parameters

Creates an empty attribute.

Constructs an attribute in the namespace described with namespaceUri with name and value value.

Constructs an attribute with qualified name qualifiedName and value value.

PySide6.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 returns false.

PySide6.QtCore.QXmlStreamAttribute.name()#
Return type

QStringView

Returns the attribute’s local name.

PySide6.QtCore.QXmlStreamAttribute.namespaceUri()#
Return type

QStringView

Returns the attribute’s resolved , or an empty string reference if the attribute does not have a defined namespace.

PySide6.QtCore.QXmlStreamAttribute.__ne__(other)#
Parameters

otherPySide6.QtCore.QXmlStreamAttribute

Return type

bool

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

PySide6.QtCore.QXmlStreamAttribute.__eq__(other)#
Parameters

otherPySide6.QtCore.QXmlStreamAttribute

Return type

bool

Compares this attribute with other and returns true if they are equal; otherwise returns false.

PySide6.QtCore.QXmlStreamAttribute.prefix()#
Return type

QStringView

Returns the attribute’s namespace prefix.

PySide6.QtCore.QXmlStreamAttribute.qualifiedName()#
Return type

QStringView

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 local name() . 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 resolved namespaceUri() and the attribute’s local name() .

PySide6.QtCore.QXmlStreamAttribute.value()#
Return type

QStringView

Returns the attribute’s value.