PySide6.QtCore.QXmlStreamAttributes¶
- class QXmlStreamAttributes¶
- The - QXmlStreamAttributesclass represents a vector of- QXmlStreamAttribute. More…- Synopsis¶- Methods¶- def - __init__()
- def - append()
- def - at()
- def - back()
- def - capacity()
- def - clear()
- def - constData()
- def - constFirst()
- def - constLast()
- def - count()
- def - data()
- def - empty()
- def - first()
- def - front()
- def - hasAttribute()
- def - insert()
- def - isEmpty()
- def - isSharedWith()
- def - last()
- def - length()
- def - max_size()
- def - mid()
- def - move()
- def - __ne__()
- def - __add__()
- def - __lshift__()
- def - __eq__()
- def - operator[]()
- def - prepend()
- def - push_back()
- def - push_front()
- def - remove()
- def - removeAll()
- def - removeAt()
- def - removeFirst()
- def - removeLast()
- def - removeOne()
- def - reserve()
- def - resize()
- def - shrink_to_fit()
- def - size()
- def - sliced()
- def - squeeze()
- def - swap()
- def - swapItemsAt()
- def - takeAt()
- def - toVector()
- def - value()
 - Static functions¶- def - fromVector()
- def - maxSize()
 - 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¶- Attributes are returned by a - QXmlStreamReaderin- attributes()when the reader reports a- start element. The class can also be used with a- QXmlStreamWriteras an argument to- writeAttributes().- The convenience function - value()loops over the vector and returns an attribute value for a given namespaceUri and an attribute’s name.- New attributes can be added with - append().- __init__()¶
 - A constructor for - QXmlStreamAttributes.- append(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttribute
 
 - append(l)
- Parameters:
- l – .list of QXmlStreamAttribute 
 
 - append(qualifiedName, value)
- Parameters:
- qualifiedName – str 
- value – str 
 
 
 - This is an overloaded function. - Appends a new attribute with qualified name - qualifiedNameand value- value.- append(namespaceUri, name, value)
- Parameters:
- namespaceUri – str 
- name – str 
- value – str 
 
 
 - Appends a new attribute with - namein the namespace described with- namespaceUri, and value- value. The- namespaceUrican be empty.- at(i)¶
- Parameters:
- i – int 
- Return type:
 
 - back()¶
- Return type:
 
 - capacity()¶
- Return type:
- int 
 
 - clear()¶
 - constData()¶
- Return type:
 
 - constFirst()¶
- Return type:
 
 - constLast()¶
- Return type:
 
 - count()¶
- Return type:
- int 
 
 - data()¶
- Return type:
 
 - empty()¶
- Return type:
- bool 
 
 - first()¶
- Return type:
 
 - first(n)
- Parameters:
- n – int 
- Return type:
- .list of QXmlStreamAttribute 
 
 - static fromVector(vector)¶
- Parameters:
- vector – .list of QXmlStreamAttribute 
- Return type:
- .list of QXmlStreamAttribute 
 
 - front()¶
- Return type:
 
 - hasAttribute(qualifiedName)¶
- Parameters:
- qualifiedName – str 
- Return type:
- bool 
 
 - Returns - trueif this- QXmlStreamAttributeshas an attribute whose qualified name is- qualifiedName; otherwise returns- false.- Note that this is not namespace aware. For instance, if this - QXmlStreamAttributescontains an attribute whose lexical name is “xlink:href” this doesn’t tell that an attribute named- hrefin the XLink namespace is present, since the- xlinkprefix can be bound to any namespace. Use the overload that takes a namespace URI and a local name as parameter, for namespace aware code.- hasAttribute(namespaceUri, name)
- Parameters:
- namespaceUri – str 
- name – str 
 
- Return type:
- bool 
 
 - This is an overloaded function. - Returns - trueif this- QXmlStreamAttributeshas an attribute whose namespace URI and name correspond to- namespaceUriand- name; otherwise returns- false.- insert(arg__1, arg__2)¶
- Parameters:
- arg__1 – int 
- arg__2 – - QXmlStreamAttribute
 
 
 - isEmpty()¶
- Return type:
- bool 
 
 - Parameters:
- other – .list of QXmlStreamAttribute 
- Return type:
- bool 
 
 - last()¶
- Return type:
 
 - last(n)
- Parameters:
- n – int 
- Return type:
- .list of QXmlStreamAttribute 
 
 - length()¶
- Return type:
- int 
 
 - static maxSize()¶
- Return type:
- int 
 
 - max_size()¶
- Return type:
- int 
 
 - mid(pos[, len=-1])¶
- Parameters:
- pos – int 
- len – int 
 
- Return type:
- .list of QXmlStreamAttribute 
 
 - move(from, to)¶
- Parameters:
- from – int 
- to – int 
 
 
 - __ne__(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttributes
- Return type:
- bool 
 
 - __add__(l)¶
- Parameters:
- l – .list of QXmlStreamAttribute 
- Return type:
- .list of QXmlStreamAttribute 
 
 - __lshift__(l)¶
- Parameters:
- l – .list of QXmlStreamAttribute 
- Return type:
- .list of QXmlStreamAttribute 
 
 - __eq__(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttributes
- Return type:
- bool 
 
 - operator(i)¶
- Parameters:
- i – int 
- Return type:
 
 - prepend(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttribute
 
 - push_back(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttribute
 
 - push_front(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttribute
 
 - remove(i[, n=1])¶
- Parameters:
- i – int 
- n – int 
 
 
 - removeAll(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttribute
 
 - removeAt(i)¶
- Parameters:
- i – int 
 
 - removeFirst()¶
 - removeLast()¶
 - removeOne(arg__1)¶
- Parameters:
- arg__1 – - QXmlStreamAttribute
 
 - reserve(size)¶
- Parameters:
- size – int 
 
 - resize(size)¶
- Parameters:
- size – int 
 
 - resizeForOverwrite(size)¶
- Parameters:
- size – int 
 
 - shrink_to_fit()¶
 - size()¶
- Return type:
- int 
 
 - sliced(pos)¶
- Parameters:
- pos – int 
- Return type:
- .list of QXmlStreamAttribute 
 
 - sliced(pos, n)
- Parameters:
- pos – int 
- n – int 
 
- Return type:
- .list of QXmlStreamAttribute 
 
 - squeeze()¶
 - swap(other)¶
- Parameters:
- other – .list of QXmlStreamAttribute 
 
 - swapItemsAt(i, j)¶
- Parameters:
- i – int 
- j – int 
 
 
 - takeAt(i)¶
- Parameters:
- i – int 
- Return type:
 
 - toVector()¶
- Return type:
- .list of QXmlStreamAttribute 
 
 - value(qualifiedName)¶
- Parameters:
- qualifiedName – str 
- Return type:
- str 
 
 - This is an overloaded function. - Returns the value of the attribute with qualified name - qualifiedName, or an empty string reference if the attribute is not defined. 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 qualified names, but a resolved namespaceUri and the attribute’s local name.- Note - In Qt versions prior to 6.6, this function was implemented as an overload set accepting - QStringand- QLatin1StringViewonly.- value(namespaceUri, name)
- Parameters:
- namespaceUri – str 
- name – str 
 
- Return type:
- str 
 
 - Returns the value of the attribute - namein the namespace described with- namespaceUri, or an empty string reference if the attribute is not defined. The- namespaceUrican be empty.- Note - In Qt versions prior to 6.6, this function was implemented as an overload set accepting combinations of - QStringand- QLatin1StringViewonly.