QXmlStreamAttribute — PyQt Documentation v6.9.0 (original) (raw)

PyQt6.QtCore.QXmlStreamAttribute

Description

The QXmlStreamAttribute class represents a single XML attribute.

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().

Methods

__init__()

Creates an empty attribute.


__init__(QXmlStreamAttribute)

TODO


__init__(Optional[str], Optional[str])

Constructs an attribute with qualified name qualifiedName and value value.


__init__(Optional[str], Optional[str], Optional[str])

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


__eq__(QXmlStreamAttribute) → bool

TODO


isDefault() → bool

Returns true if the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returns false.


name() → str

Returns the attribute’s local name.


namespaceUri() → str

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


__ne__(QXmlStreamAttribute) → bool

TODO


prefix() → str

Returns the attribute’s namespace prefix.

See also

name(), qualifiedName().


qualifiedName() → str

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().


value() → str

Returns the attribute’s value.