File: qxmlattributes.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (201 lines) | stat: -rw-r--r-- 17,395 bytes parent folder | download
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?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" />
<!-- qxml.cpp -->
  <title>Qt 4.8: QXmlAttributes 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="qtxml.html">QtXml</a></li>
<li>QXmlAttributes</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">QXmlAttributes Class Reference</h1>
<!-- $$$QXmlAttributes-brief -->
<p>The QXmlAttributes class provides XML attributes. <a href="#details">More...</a></p>
<!-- @@@QXmlAttributes -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QXmlAttributes&gt;</span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qxmlattributes-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="qxmlattributes.html#QXmlAttributes">QXmlAttributes</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#dtor.QXmlAttributes">~QXmlAttributes</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#append">append</a></b> ( const QString &amp; <i>qName</i>, const QString &amp; <i>uri</i>, const QString &amp; <i>localPart</i>, const QString &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#count">count</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#index">index</a></b> ( const QString &amp; <i>qName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#index-2">index</a></b> ( const QLatin1String &amp; <i>qName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#index-3">index</a></b> ( const QString &amp; <i>uri</i>, const QString &amp; <i>localPart</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#length">length</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#localName">localName</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#qName">qName</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#type">type</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#type-2">type</a></b> ( const QString &amp; <i>qName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#type-3">type</a></b> ( const QString &amp; <i>uri</i>, const QString &amp; <i>localName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#uri">uri</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#value">value</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#value-2">value</a></b> ( const QString &amp; <i>qName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#value-3">value</a></b> ( const QLatin1String &amp; <i>qName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlattributes.html#value-4">value</a></b> ( const QString &amp; <i>uri</i>, const QString &amp; <i>localName</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QXmlAttributes-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QXmlAttributes class provides XML attributes.</p>
<p>If attributes are reported by <a href="qxmlcontenthandler.html#startElement">QXmlContentHandler::startElement</a>() this class is used to pass the attribute values.</p>
<p>Use <a href="qxmlattributes.html#index">index</a>() to locate the position of an attribute in the list, <a href="qxmlattributes.html#count">count</a>() to retrieve the number of attributes, and <a href="qxmlattributes.html#clear">clear</a>() to remove the attributes. New attributes can be added with <a href="qxmlattributes.html#append">append</a>(). Use <a href="qxmlattributes.html#type">type</a>() to get an attribute's type and <a href="qxmlattributes.html#value">value</a>() to get its value. The attribute's name is available from <a href="qxmlattributes.html#localName">localName</a>() or <a href="qxmlattributes.html#qName">qName</a>(), and its namespace URI from <a href="qxmlattributes.html#uri">uri</a>().</p>
</div>
<!-- @@@QXmlAttributes -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QXmlAttributes[overload1]$$$QXmlAttributes -->
<h3 class="fn"><a name="QXmlAttributes"></a>QXmlAttributes::<span class="name">QXmlAttributes</span> ()</h3>
<p>Constructs an empty attribute list.</p>
<!-- @@@QXmlAttributes -->
<!-- $$$~QXmlAttributes[overload1]$$$~QXmlAttributes -->
<h3 class="fn"><a name="dtor.QXmlAttributes"></a>QXmlAttributes::<span class="name">~QXmlAttributes</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the attributes object.</p>
<!-- @@@~QXmlAttributes -->
<!-- $$$append[overload1]$$$appendconstQString&constQString&constQString&constQString& -->
<h3 class="fn"><a name="append"></a><span class="type">void</span> QXmlAttributes::<span class="name">append</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>qName</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>uri</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>localPart</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>value</i> )</h3>
<p>Appends a new attribute entry to the list of attributes. The qualified name of the attribute is <i>qName</i>, the namespace URI is <i>uri</i> and the local name is <i>localPart</i>. The value of the attribute is <i>value</i>.</p>
<p><b>See also </b><a href="qxmlattributes.html#qName">qName</a>(), <a href="qxmlattributes.html#uri">uri</a>(), <a href="qxmlattributes.html#localName">localName</a>(), and <a href="qxmlattributes.html#value">value</a>().</p>
<!-- @@@append -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QXmlAttributes::<span class="name">clear</span> ()</h3>
<p>Clears the list of attributes.</p>
<p><b>See also </b><a href="qxmlattributes.html#append">append</a>().</p>
<!-- @@@clear -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn"><a name="count"></a><span class="type">int</span> QXmlAttributes::<span class="name">count</span> () const</h3>
<p>Returns the number of attributes in the list. This function is equivalent to <a href="qxmlattributes.html#length">length</a>().</p>
<!-- @@@count -->
<!-- $$$index[overload1]$$$indexconstQString& -->
<h3 class="fn"><a name="index"></a><span class="type">int</span> QXmlAttributes::<span class="name">index</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>qName</i> ) const</h3>
<p>Looks up the index of an attribute by the qualified name <i>qName</i>.</p>
<p>Returns the index of the attribute or -1 if it wasn't found.</p>
<p><b>See also </b><a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
<!-- @@@index -->
<!-- $$$index$$$indexconstQLatin1String& -->
<h3 class="fn"><a name="index-2"></a><span class="type">int</span> QXmlAttributes::<span class="name">index</span> ( const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> &amp; <i>qName</i> ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@index -->
<!-- $$$index$$$indexconstQString&constQString& -->
<h3 class="fn"><a name="index-3"></a><span class="type">int</span> QXmlAttributes::<span class="name">index</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>uri</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>localPart</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Looks up the index of an attribute by a namespace name.</p>
<p><i>uri</i> specifies the namespace URI, or an empty string if the name has no namespace URI. <i>localPart</i> specifies the attribute's local name.</p>
<p>Returns the index of the attribute, or -1 if it wasn't found.</p>
<p><b>See also </b><a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
<!-- @@@index -->
<!-- $$$length[overload1]$$$length -->
<h3 class="fn"><a name="length"></a><span class="type">int</span> QXmlAttributes::<span class="name">length</span> () const</h3>
<p>Returns the number of attributes in the list.</p>
<p><b>See also </b><a href="qxmlattributes.html#count">count</a>().</p>
<!-- @@@length -->
<!-- $$$localName[overload1]$$$localNameint -->
<h3 class="fn"><a name="localName"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">localName</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Looks up an attribute's local name for the attribute at position <i>index</i>. If no namespace processing is done, the local name is an empty string.</p>
<p><b>See also </b><a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
<!-- @@@localName -->
<!-- $$$qName[overload1]$$$qNameint -->
<h3 class="fn"><a name="qName"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">qName</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Looks up an attribute's XML 1.0 qualified name for the attribute at position <i>index</i>.</p>
<p><b>See also </b><a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
<!-- @@@qName -->
<!-- $$$type[overload1]$$$typeint -->
<h3 class="fn"><a name="type"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">type</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Looks up an attribute's type for the attribute at position <i>index</i>.</p>
<p>Currently only &quot;CDATA&quot; is returned.</p>
<!-- @@@type -->
<!-- $$$type$$$typeconstQString& -->
<h3 class="fn"><a name="type-2"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">type</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>qName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Looks up an attribute's type for the qualified name <i>qName</i>.</p>
<p>Currently only &quot;CDATA&quot; is returned.</p>
<!-- @@@type -->
<!-- $$$type$$$typeconstQString&constQString& -->
<h3 class="fn"><a name="type-3"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">type</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>uri</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>localName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Looks up an attribute's type by namespace name.</p>
<p><i>uri</i> specifies the namespace URI and <i>localName</i> specifies the local name. If the name has no namespace URI, use an empty string for <i>uri</i>.</p>
<p>Currently only &quot;CDATA&quot; is returned.</p>
<!-- @@@type -->
<!-- $$$uri[overload1]$$$uriint -->
<h3 class="fn"><a name="uri"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">uri</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Looks up an attribute's namespace URI for the attribute at position <i>index</i>. If no namespace processing is done or if the attribute has no namespace, the namespace URI is an empty string.</p>
<p><b>See also </b><a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
<!-- @@@uri -->
<!-- $$$value[overload1]$$$valueint -->
<h3 class="fn"><a name="value"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">value</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns an attribute's value for the attribute at position <i>index</i>. The index must be a valid position (i.e&#x2e;, 0 &lt;= <i>index</i> &lt; <a href="qxmlattributes.html#count">count</a>()).</p>
<!-- @@@value -->
<!-- $$$value$$$valueconstQString& -->
<h3 class="fn"><a name="value-2"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">value</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>qName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns an attribute's value for the qualified name <i>qName</i>, or an empty string if no attribute exists for the name given.</p>
<p><b>See also </b><a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
<!-- @@@value -->
<!-- $$$value$$$valueconstQLatin1String& -->
<h3 class="fn"><a name="value-3"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">value</span> ( const <span class="type"><a href="qlatin1string.html">QLatin1String</a></span> &amp; <i>qName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns an attribute's value for the qualified name <i>qName</i>, or an empty string if no attribute exists for the name given.</p>
<p><b>See also </b><a href="xml-sax.html#namespace-support-via-features">Namespace Support via Features</a>.</p>
<!-- @@@value -->
<!-- $$$value$$$valueconstQString&constQString& -->
<h3 class="fn"><a name="value-4"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlAttributes::<span class="name">value</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>uri</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>localName</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns an attribute's value by namespace name.</p>
<p><i>uri</i> specifies the namespace URI, or an empty string if the name has no namespace URI. <i>localName</i> specifies the attribute's local name.</p>
<!-- @@@value -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</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>