PySide6.QtCore.QXmlStreamAttribute¶
- class QXmlStreamAttribute¶
- The - QXmlStreamAttributeclass represents a single XML attribute. More…- Synopsis¶- Methods¶- def - __init__()
- def - isDefault()
- def - name()
- def - namespaceUri()
- def - __ne__()
- def - __eq__()
- def - prefix()
- def - qualifiedName()
- def - value()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - 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().- __init__()¶
 - Creates an empty attribute. - __init__(qualifiedName, value)
- Parameters:
- qualifiedName – str 
- value – str 
 
 
 - Constructs an attribute with qualified name - qualifiedNameand value- value.- __init__(namespaceUri, name, value)
- Parameters:
- namespaceUri – str 
- name – str 
- value – str 
 
 
 - Constructs an attribute in the namespace described with - namespaceUriwith- nameand value- value.- isDefault()¶
- Return type:
- bool 
 
 - Returns - trueif the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returns- false.- name()¶
- Return type:
- str 
 
 - Returns the attribute’s local name. - namespaceUri()¶
- Return type:
- str 
 
 - Returns the attribute’s resolved namespaceUri, or an empty string reference if the attribute does not have a defined namespace. - __ne__(rhs)¶
- Parameters:
- rhs – - QXmlStreamAttribute
- Return type:
- bool 
 
 - Compares - lhsattribute with- rhsand returns- trueif they are not equal; otherwise returns- false.- __eq__(rhs)¶
- Parameters:
- rhs – - QXmlStreamAttribute
- Return type:
- bool 
 
 - Compares - lhsattribute with- rhsand returns- trueif they are equal; otherwise returns- false.- prefix()¶
- Return type:
- str 
 
 - Returns the attribute’s namespace prefix. - See also - qualifiedName()¶
- Return type:
- 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 qualifiedName(), but the resolved- namespaceUri()and the attribute’s local- name().- value()¶
- Return type:
- str 
 
 - Returns the attribute’s value.