QXmlStreamAttributes

Inheritance diagram of QXmlStreamAttributes

Synopsis

Functions

Detailed Description

The PySide.QtCore.QXmlStreamAttributes class represents a vector of PySide.QtCore.QXmlStreamAttribute .

Attributes are returned by a PySide.QtCore.QXmlStreamReader in PySide.QtCore.QXmlStreamReader.attributes() when the reader reports a start element . The class can also be used with a PySide.QtCore.QXmlStreamWriter as an argument to PySide.QtCore.QXmlStreamWriter.writeAttributes() .

The convenience function PySide.QtCore.QXmlStreamAttributes.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 PySide.QtCore.QXmlStreamAttributes.append() .

class PySide.QtCore.QXmlStreamAttributes
class PySide.QtCore.QXmlStreamAttributes(QXmlStreamAttributes)
Parameters:QXmlStreamAttributesPySide.QtCore.QXmlStreamAttributes
PySide.QtCore.QXmlStreamAttributes.alignOfTypedData()
Return type:PySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.append(attribute)
Parameters:attributePySide.QtCore.QXmlStreamAttribute

Appends the given attribute to the end of the vector.

See also

QVector.append()

PySide.QtCore.QXmlStreamAttributes.append(qualifiedName, value)
Parameters:
  • qualifiedName – unicode
  • value – unicode

This is an overloaded function.

Appends a new attribute with qualified name qualifiedName and value value .

PySide.QtCore.QXmlStreamAttributes.append(namespaceUri, name, value)
Parameters:
  • namespaceUri – unicode
  • name – unicode
  • value – unicode

Appends a new attribute with name in the namespace described with namespaceUri , and value value . The namespaceUri can be empty.

PySide.QtCore.QXmlStreamAttributes.at(i)
Parameters:iPySide.QtCore.int
Return type:PySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.capacity()
Return type:PySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.clear()
PySide.QtCore.QXmlStreamAttributes.constData()
Return type:PySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.contains(t)
Parameters:tPySide.QtCore.QXmlStreamAttribute
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.count(t)
Parameters:tPySide.QtCore.QXmlStreamAttribute
Return type:PySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.count()
Return type:PySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.data()
Return type:PySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.detach_helper()
PySide.QtCore.QXmlStreamAttributes.empty()
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.endsWith(t)
Parameters:tPySide.QtCore.QXmlStreamAttribute
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.erase(abegin, aend)
Parameters:
Return type:

PySide.QtCore.QXmlStreamAttribute

PySide.QtCore.QXmlStreamAttributes.fill(t[, size=-1])
Parameters:
Return type:

PySide.QtCore.QXmlStreamAttributes.first()
Return type:PySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.front()
Return type:PySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.hasAttribute(qualifiedName)
Parameters:qualifiedName – unicode
Return type:PySide.QtCore.bool

Returns true if this PySide.QtCore.QXmlStreamAttributes has an attribute whose qualified name is qualifiedName ; otherwise returns false.

Note that this is not namespace aware. For instance, if this PySide.QtCore.QXmlStreamAttributes contains an attribute whose lexical name is “xlink:href” this doesn’t tell that an attribute named href in the XLink namespace is present, since the xlink prefix can be bound to any namespace. Use the overload that takes a namespace URI and a local name as parameter, for namespace aware code.

PySide.QtCore.QXmlStreamAttributes.hasAttribute(namespaceUri, name)
Parameters:
  • namespaceUri – unicode
  • name – unicode
Return type:

PySide.QtCore.bool

This is an overloaded function.

Returns true if this PySide.QtCore.QXmlStreamAttributes has an attribute whose namespace URI and name correspond to namespaceUri and name ; otherwise returns false.

PySide.QtCore.QXmlStreamAttributes.indexOf(t[, from=0])
Parameters:
Return type:

PySide.QtCore.int

PySide.QtCore.QXmlStreamAttributes.insert(i, t)
Parameters:
PySide.QtCore.QXmlStreamAttributes.insert(i, n, t)
Parameters:
PySide.QtCore.QXmlStreamAttributes.insert(before, n, t)
Parameters:
Return type:

PySide.QtCore.QXmlStreamAttribute

PySide.QtCore.QXmlStreamAttributes.isEmpty()
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.isSharedWith(other)
Parameters:other
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.last()
Return type:PySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.lastIndexOf(t[, from=-1])
Parameters:
Return type:

PySide.QtCore.int

PySide.QtCore.QXmlStreamAttributes.mid(pos[, length=-1])
Parameters:
  • posPySide.QtCore.int
  • lengthPySide.QtCore.int
Return type:

PySide.QtCore.QXmlStreamAttributes.__ne__(v)
Parameters:v
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.__add__(l)
Parameters:l
Return type:
PySide.QtCore.QXmlStreamAttributes.__iadd__(t)
Parameters:tPySide.QtCore.QXmlStreamAttribute
Return type:
PySide.QtCore.QXmlStreamAttributes.__lshift__(t)
Parameters:tPySide.QtCore.QXmlStreamAttribute
Return type:
PySide.QtCore.QXmlStreamAttributes.__lshift__(l)
Parameters:l
Return type:
PySide.QtCore.QXmlStreamAttributes.__eq__(v)
Parameters:v
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.operator[](i)
Parameters:iPySide.QtCore.int
Return type:PySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.prepend(t)
Parameters:tPySide.QtCore.QXmlStreamAttribute
PySide.QtCore.QXmlStreamAttributes.realloc(size, alloc)
Parameters:
  • sizePySide.QtCore.int
  • allocPySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.remove(i, n)
Parameters:
  • iPySide.QtCore.int
  • nPySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.remove(i)
Parameters:iPySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.replace(i, t)
Parameters:
PySide.QtCore.QXmlStreamAttributes.reserve(size)
Parameters:sizePySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.resize(size)
Parameters:sizePySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.setSharable(sharable)
Parameters:sharablePySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.size()
Return type:PySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.sizeOfTypedData()
Return type:PySide.QtCore.int
PySide.QtCore.QXmlStreamAttributes.squeeze()
PySide.QtCore.QXmlStreamAttributes.startsWith(t)
Parameters:tPySide.QtCore.QXmlStreamAttribute
Return type:PySide.QtCore.bool
PySide.QtCore.QXmlStreamAttributes.value(namespaceUri, name)
Parameters:
  • namespaceUri – unicode
  • name – unicode
Return type:

PySide.QtCore.QStringRef

Returns the value of the attribute name in the namespace described with namespaceUri , or an empty string reference if the attribute is not defined. The namespaceUri can be empty.

PySide.QtCore.QXmlStreamAttributes.value(qualifiedName)
Parameters:qualifiedName – unicode
Return type:PySide.QtCore.QStringRef

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.