1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qxmlstream.cpp -->
<title>Qt 4.8: QXmlStreamAttributes Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtcore.html">QtCore</a></li>
<li>QXmlStreamAttributes</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QXmlStreamAttributes Class Reference</h1>
<!-- $$$QXmlStreamAttributes-brief -->
<p>The QXmlStreamAttributes class represents a vector of <a href="qxmlstreamattribute.html">QXmlStreamAttribute</a>. <a href="#details">More...</a></p>
<!-- @@@QXmlStreamAttributes -->
<pre class="cpp"> <span class="preprocessor">#include <QXmlStreamAttributes></span></pre><p><b>Inherits: </b><a href="qvector.html">QVector<QXmlStreamAttribute></a>.</p>
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<p>This class was introduced in Qt 4.3.</p>
<ul>
<li><a href="qxmlstreamattributes-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#QXmlStreamAttributes">QXmlStreamAttributes</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#append">append</a></b> ( const QString & <i>namespaceUri</i>, const QString & <i>name</i>, const QString & <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#append-2">append</a></b> ( const QXmlStreamAttribute & <i>attribute</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#append-3">append</a></b> ( const QString & <i>qualifiedName</i>, const QString & <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#hasAttribute">hasAttribute</a></b> ( const QString & <i>qualifiedName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#hasAttribute-2">hasAttribute</a></b> ( const QLatin1String & <i>qualifiedName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#hasAttribute-3">hasAttribute</a></b> ( const QString & <i>namespaceUri</i>, const QString & <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#value">value</a></b> ( const QString & <i>namespaceUri</i>, const QString & <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#value-2">value</a></b> ( const QString & <i>namespaceUri</i>, const QLatin1String & <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#value-3">value</a></b> ( const QLatin1String & <i>namespaceUri</i>, const QLatin1String & <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#value-4">value</a></b> ( const QString & <i>qualifiedName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringRef </td><td class="memItemRight bottomAlign"><b><a href="qxmlstreamattributes.html#value-5">value</a></b> ( const QLatin1String & <i>qualifiedName</i> ) const</td></tr>
</table>
<ul>
<li class="fn">65 public functions inherited from <a href="qvector.html#public-functions">QVector</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">2 static public members inherited from <a href="qvector.html#static-public-members">QVector</a></li>
</ul>
<a name="details"></a>
<!-- $$$QXmlStreamAttributes-description -->
<div class="descr">
<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>
</div>
<!-- @@@QXmlStreamAttributes -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QXmlStreamAttributes[overload1]$$$QXmlStreamAttributes -->
<h3 class="fn"><a name="QXmlStreamAttributes"></a>QXmlStreamAttributes::<span class="name">QXmlStreamAttributes</span> ()</h3>
<!-- @@@QXmlStreamAttributes -->
<!-- $$$append[overload1]$$$appendconstQString&constQString&constQString& -->
<h3 class="fn"><a name="append"></a><span class="type">void</span> QXmlStreamAttributes::<span class="name">append</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>namespaceUri</i>, const <span class="type"><a href="qstring.html">QString</a></span> & <i>name</i>, const <span class="type"><a href="qstring.html">QString</a></span> & <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>
<!-- @@@append -->
<!-- $$$append$$$appendconstQXmlStreamAttribute& -->
<h3 class="fn"><a name="append-2"></a><span class="type">void</span> QXmlStreamAttributes::<span class="name">append</span> ( const <span class="type"><a href="qxmlstreamattribute.html">QXmlStreamAttribute</a></span> & <i>attribute</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>
<!-- @@@append -->
<!-- $$$append$$$appendconstQString&constQString& -->
<h3 class="fn"><a name="append-3"></a><span class="type">void</span> QXmlStreamAttributes::<span class="name">append</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>qualifiedName</i>, const <span class="type"><a href="qstring.html">QString</a></span> & <i>value</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>
<!-- @@@append -->
<!-- $$$hasAttribute[overload1]$$$hasAttributeconstQString& -->
<h3 class="fn"><a name="hasAttribute"></a><span class="type">bool</span> QXmlStreamAttributes::<span class="name">hasAttribute</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>qualifiedName</i> ) const</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>
<!-- @@@hasAttribute -->
<!-- $$$hasAttribute$$$hasAttributeconstQLatin1String& -->
<h3 class="fn"><a name="hasAttribute-2"></a><span class="type">bool</span> QXmlStreamAttributes::<span class="name">hasAttribute</span> ( const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> & <i>qualifiedName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@hasAttribute -->
<!-- $$$hasAttribute$$$hasAttributeconstQString&constQString& -->
<h3 class="fn"><a name="hasAttribute-3"></a><span class="type">bool</span> QXmlStreamAttributes::<span class="name">hasAttribute</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>namespaceUri</i>, const <span class="type"><a href="qstring.html">QString</a></span> & <i>name</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns true if this <a href="qxmlstreamattributes.html">QXmlStreamAttributes</a> has an attribute whose namespace URI and name correspond to <i>namespaceUri</i> and <i>name</i>; otherwise returns false.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@hasAttribute -->
<!-- $$$value[overload1]$$$valueconstQString&constQString& -->
<h3 class="fn"><a name="value"></a><span class="type"><a href="qstringref.html">QStringRef</a></span> QXmlStreamAttributes::<span class="name">value</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>namespaceUri</i>, const <span class="type"><a href="qstring.html">QString</a></span> & <i>name</i> ) const</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>
<!-- @@@value -->
<!-- $$$value$$$valueconstQString&constQLatin1String& -->
<h3 class="fn"><a name="value-2"></a><span class="type"><a href="qstringref.html">QStringRef</a></span> QXmlStreamAttributes::<span class="name">value</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>namespaceUri</i>, const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> & <i>name</i> ) const</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>
<!-- @@@value -->
<!-- $$$value$$$valueconstQLatin1String&constQLatin1String& -->
<h3 class="fn"><a name="value-3"></a><span class="type"><a href="qstringref.html">QStringRef</a></span> QXmlStreamAttributes::<span class="name">value</span> ( const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> & <i>namespaceUri</i>, const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> & <i>name</i> ) const</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>
<!-- @@@value -->
<!-- $$$value$$$valueconstQString& -->
<h3 class="fn"><a name="value-4"></a><span class="type"><a href="qstringref.html">QStringRef</a></span> QXmlStreamAttributes::<span class="name">value</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>qualifiedName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the value of the attribute with qualified name <i>qualifiedName</i> , 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.</p>
<!-- @@@value -->
<!-- $$$value$$$valueconstQLatin1String& -->
<h3 class="fn"><a name="value-5"></a><span class="type"><a href="qstringref.html">QStringRef</a></span> QXmlStreamAttributes::<span class="name">value</span> ( const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> & <i>qualifiedName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the value of the attribute with qualified name <i>qualifiedName</i> , 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.</p>
<!-- @@@value -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|