<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QXmlStreamAttributes Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QXmlStreamAttributes Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QXmlStreamAttributes class represents a vector of <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>. <a href="#details">More...</a></p>

<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qxmlstreamattributes.html#QXmlStreamAttributes">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#QXmlStreamAttributes-2">__init__</a></b> (<i>self</i>, QXmlStreamAttributes)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#append">append</a></b> (<i>self</i>, QString&#160;<i>namespaceUri</i>, QString&#160;<i>name</i>, QString&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#append-2">append</a></b> (<i>self</i>, QString&#160;<i>qualifiedName</i>, QString&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#append-3">append</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>attribute</i>)</li><li><div class="fn" />QXmlStreamAttribute <b><a href="qxmlstreamattributes.html#at">at</a></b> (<i>self</i>, int&#160;<i>i</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlstreamattributes.html#contains">contains</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" />int <b><a href="qxmlstreamattributes.html#count">count</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" />int <b><a href="qxmlstreamattributes.html#count-2">count</a></b> (<i>self</i>)</li><li><div class="fn" />sip.voidptr <b><a href="qxmlstreamattributes.html#data">data</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#fill">fill</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>, int&#160;<i>size</i>&#160;=&#160;-1)</li><li><div class="fn" />QXmlStreamAttribute <b><a href="qxmlstreamattributes.html#first">first</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlstreamattributes.html#hasAttribute">hasAttribute</a></b> (<i>self</i>, QString&#160;<i>qualifiedName</i>)</li><li><div class="fn" />bool <b><a href="qxmlstreamattributes.html#hasAttribute-2">hasAttribute</a></b> (<i>self</i>, QString&#160;<i>namespaceUri</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />int <b><a href="qxmlstreamattributes.html#indexOf">indexOf</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>, int&#160;<i>from</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#insert">insert</a></b> (<i>self</i>, int&#160;<i>i</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" />bool <b><a href="qxmlstreamattributes.html#isEmpty">isEmpty</a></b> (<i>self</i>)</li><li><div class="fn" />QXmlStreamAttribute <b><a href="qxmlstreamattributes.html#last">last</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qxmlstreamattributes.html#lastIndexOf">lastIndexOf</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>, int&#160;<i>from</i>&#160;=&#160;-1)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#prepend">prepend</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#remove">remove</a></b> (<i>self</i>, int&#160;<i>i</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#remove-2">remove</a></b> (<i>self</i>, int&#160;<i>i</i>, int&#160;<i>count</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#replace">replace</a></b> (<i>self</i>, int&#160;<i>i</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" />int <b><a href="qxmlstreamattributes.html#size">size</a></b> (<i>self</i>)</li><li><div class="fn" />QStringRef <b><a href="qxmlstreamattributes.html#value">value</a></b> (<i>self</i>, QString&#160;<i>namespaceUri</i>, QString&#160;<i>name</i>)</li><li><div class="fn" />QStringRef <b><a href="qxmlstreamattributes.html#value-2">value</a></b> (<i>self</i>, QString&#160;<i>qualifiedName</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />int <b><a href="qxmlstreamattributes.html#__contains__">__contains__</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#__delitem__">__delitem__</a></b> (<i>self</i>, int&#160;<i>i</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#__delitem__-2">__delitem__</a></b> (<i>self</i>, slice&#160;<i>slice</i>)</li><li><div class="fn" />bool <b><a href="qxmlstreamattributes.html#__eq__">__eq__</a></b> (<i>self</i>, QXmlStreamAttributes&#160;<i>other</i>)</li><li><div class="fn" />QXmlStreamAttribute <b><a href="qxmlstreamattributes.html#__getitem__">__getitem__</a></b> (<i>self</i>, int&#160;<i>i</i>)</li><li><div class="fn" />QXmlStreamAttributes <b><a href="qxmlstreamattributes.html#__getitem__-2">__getitem__</a></b> (<i>self</i>, slice&#160;<i>slice</i>)</li><li><div class="fn" />QXmlStreamAttributes <b><a href="qxmlstreamattributes.html#__iadd__">__iadd__</a></b> (<i>self</i>, QXmlStreamAttributes&#160;<i>other</i>)</li><li><div class="fn" />QXmlStreamAttributes <b><a href="qxmlstreamattributes.html#__iadd__-2">__iadd__</a></b> (<i>self</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" /> <b><a href="qxmlstreamattributes.html#__len__">__len__</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qxmlstreamattributes.html#__ne__">__ne__</a></b> (<i>self</i>, QXmlStreamAttributes&#160;<i>other</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#__setitem__">__setitem__</a></b> (<i>self</i>, int&#160;<i>i</i>, QXmlStreamAttribute&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qxmlstreamattributes.html#__setitem__-2">__setitem__</a></b> (<i>self</i>, slice&#160;<i>slice</i>, QXmlStreamAttributes&#160;<i>list</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QXmlStreamAttributes class represents a vector of <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>.</p>
<p>Attributes are returned by a <a href="qxmlstreamreader.html">QXmlStreamReader</a> in <a href="qxmlstreamreader.html#attributes">attributes()</a> when the reader
reports a <a href="qxmlstreamreader.html#TokenType-enum">start
element</a>. The class can also be used with a <a href="qxmlstreamwriter.html">QXmlStreamWriter</a> as an argument to
<a href="qxmlstreamwriter.html#writeAttributes">writeAttributes()</a>.</p>
<p>The convenience function <a href="qxmlstreamattributes.html#value">value</a>() loops over the vector
and returns an attribute value for a given namespaceUri and an
attribute's name.</p>
<p>New attributes can be added with <a href="qxmlstreamattributes.html#append">append</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QXmlStreamAttributes" />QXmlStreamAttributes.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QXmlStreamAttributes-2" />QXmlStreamAttributes.__init__ (<i>self</i>, <a href="qxmlstreamattributes.html">QXmlStreamAttributes</a>)</h3><h3 class="fn"><a name="append" />QXmlStreamAttributes.append (<i>self</i>, QString&#160;<i>namespaceUri</i>, QString&#160;<i>name</i>, QString&#160;<i>value</i>)</h3><p>Appends a new attribute with <i>name</i> in the namespace
described with <i>namespaceUri</i>, and value <i>value</i>. The
<i>namespaceUri</i> can be empty.</p>


<h3 class="fn"><a name="append-2" />QXmlStreamAttributes.append (<i>self</i>, QString&#160;<i>qualifiedName</i>, QString&#160;<i>value</i>)</h3><p>Appends the given <i>attribute</i> to the end of the vector.</p>
<p><b>See also</b> <a href="qvector.html#append">QVector.append</a>().</p>


<h3 class="fn"><a name="append-3" />QXmlStreamAttributes.append (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>attribute</i>)</h3><p>This is an overloaded function.</p>
<p>Appends a new attribute with qualified name <i>qualifiedName</i>
and value <i>value</i>.</p>


<h3 class="fn"><a name="at" /><a href="qxmlstreamattribute.html">QXmlStreamAttribute</a> QXmlStreamAttributes.at (<i>self</i>, int&#160;<i>i</i>)</h3><h3 class="fn"><a name="clear" />QXmlStreamAttributes.clear (<i>self</i>)</h3><h3 class="fn"><a name="contains" />bool QXmlStreamAttributes.contains (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="count" />int QXmlStreamAttributes.count (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="count-2" />int QXmlStreamAttributes.count (<i>self</i>)</h3><h3 class="fn"><a name="data" />sip.voidptr QXmlStreamAttributes.data (<i>self</i>)</h3><h3 class="fn"><a name="fill" />QXmlStreamAttributes.fill (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>, int&#160;<i>size</i>&#160;=&#160;-1)</h3><h3 class="fn"><a name="first" /><a href="qxmlstreamattribute.html">QXmlStreamAttribute</a> QXmlStreamAttributes.first (<i>self</i>)</h3><h3 class="fn"><a name="hasAttribute" />bool QXmlStreamAttributes.hasAttribute (<i>self</i>, QString&#160;<i>qualifiedName</i>)</h3><p>Returns true if this <a href="qxmlstreamattributes.html">QXmlStreamAttributes</a> has an
attribute whose qualified name is <i>qualifiedName</i>; otherwise
returns false.</p>
<p>Note that this is not namespace aware. For instance, if this
<a href="qxmlstreamattributes.html">QXmlStreamAttributes</a>
contains an attribute whose lexical name is "xlink:href" this
doesn't tell that an attribute named <tt>href</tt> in the XLink
namespace is present, since the <tt>xlink</tt> 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.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="hasAttribute-2" />bool QXmlStreamAttributes.hasAttribute (<i>self</i>, QString&#160;<i>namespaceUri</i>, QString&#160;<i>name</i>)</h3><p>This is an overloaded function.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="indexOf" />int QXmlStreamAttributes.indexOf (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>, int&#160;<i>from</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="insert" />QXmlStreamAttributes.insert (<i>self</i>, int&#160;<i>i</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="isEmpty" />bool QXmlStreamAttributes.isEmpty (<i>self</i>)</h3><h3 class="fn"><a name="last" /><a href="qxmlstreamattribute.html">QXmlStreamAttribute</a> QXmlStreamAttributes.last (<i>self</i>)</h3><h3 class="fn"><a name="lastIndexOf" />int QXmlStreamAttributes.lastIndexOf (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>, int&#160;<i>from</i>&#160;=&#160;-1)</h3><h3 class="fn"><a name="prepend" />QXmlStreamAttributes.prepend (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="remove" />QXmlStreamAttributes.remove (<i>self</i>, int&#160;<i>i</i>)</h3><h3 class="fn"><a name="remove-2" />QXmlStreamAttributes.remove (<i>self</i>, int&#160;<i>i</i>, int&#160;<i>count</i>)</h3><h3 class="fn"><a name="replace" />QXmlStreamAttributes.replace (<i>self</i>, int&#160;<i>i</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="size" />int QXmlStreamAttributes.size (<i>self</i>)</h3><h3 class="fn"><a name="value" />QStringRef QXmlStreamAttributes.value (<i>self</i>, QString&#160;<i>namespaceUri</i>, QString&#160;<i>name</i>)</h3><p>Returns the value of the attribute <i>name</i> in the namespace
described with <i>namespaceUri</i>, or an empty string reference if
the attribute is not defined. The <i>namespaceUri</i> can be
empty.</p>


<h3 class="fn"><a name="value-2" />QStringRef QXmlStreamAttributes.value (<i>self</i>, QString&#160;<i>qualifiedName</i>)</h3><p>This is an overloaded function.</p>
<p>Returns the value of the attribute <i>name</i> in the namespace
described with <i>namespaceUri</i>, or an empty string reference if
the attribute is not defined. The <i>namespaceUri</i> can be
empty.</p>


<h3 class="fn"><a name="__contains__" />int QXmlStreamAttributes.__contains__ (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="__delitem__" />QXmlStreamAttributes.__delitem__ (<i>self</i>, int&#160;<i>i</i>)</h3><h3 class="fn"><a name="__delitem__-2" />QXmlStreamAttributes.__delitem__ (<i>self</i>, slice&#160;<i>slice</i>)</h3><h3 class="fn"><a name="__eq__" />bool QXmlStreamAttributes.__eq__ (<i>self</i>, <a href="qxmlstreamattributes.html">QXmlStreamAttributes</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__getitem__" /><a href="qxmlstreamattribute.html">QXmlStreamAttribute</a> QXmlStreamAttributes.__getitem__ (<i>self</i>, int&#160;<i>i</i>)</h3><h3 class="fn"><a name="__getitem__-2" /><a href="qxmlstreamattributes.html">QXmlStreamAttributes</a> QXmlStreamAttributes.__getitem__ (<i>self</i>, slice&#160;<i>slice</i>)</h3><h3 class="fn"><a name="__iadd__" /><a href="qxmlstreamattributes.html">QXmlStreamAttributes</a> QXmlStreamAttributes.__iadd__ (<i>self</i>, <a href="qxmlstreamattributes.html">QXmlStreamAttributes</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__iadd__-2" /><a href="qxmlstreamattributes.html">QXmlStreamAttributes</a> QXmlStreamAttributes.__iadd__ (<i>self</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="__len__" /> QXmlStreamAttributes.__len__ (<i>self</i>)</h3><h3 class="fn"><a name="__ne__" />bool QXmlStreamAttributes.__ne__ (<i>self</i>, <a href="qxmlstreamattributes.html">QXmlStreamAttributes</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__setitem__" />QXmlStreamAttributes.__setitem__ (<i>self</i>, int&#160;<i>i</i>, <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="__setitem__-2" />QXmlStreamAttributes.__setitem__ (<i>self</i>, slice&#160;<i>slice</i>, <a href="qxmlstreamattributes.html">QXmlStreamAttributes</a>&#160;<i>list</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.11.2 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://qt.digia.com">Digia</a> 2014</td><td align="right" width="25%">Qt&#160;4.8.6</td></tr></table></div></address></body></html>