~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qxmlattributes.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/xml/qxml.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QXmlAttributes Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QXmlAttributes Class Reference</h1>
 
21
<p>The QXmlAttributes class provides XML attributes. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QXmlAttributes&gt;</pre><p>Part of the <a href="qtxml.html">QtXml</a> module.</p>
 
23
<p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
 
24
<ul>
 
25
<li><a href="qxmlattributes-members.html">List of all members, including inherited members</a></li>
 
26
</ul>
 
27
<a name="public-functions"></a>
 
28
<h3>Public Functions</h3>
 
29
<ul>
 
30
<li><div class="fn"/><b><a href="qxmlattributes.html#QXmlAttributes">QXmlAttributes</a></b> ()</li>
 
31
<li><div class="fn"/>virtual <b><a href="qxmlattributes.html#dtor.QXmlAttributes">~QXmlAttributes</a></b> ()</li>
 
32
<li><div class="fn"/>void <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> )</li>
 
33
<li><div class="fn"/>void <b><a href="qxmlattributes.html#clear">clear</a></b> ()</li>
 
34
<li><div class="fn"/>int <b><a href="qxmlattributes.html#count">count</a></b> () const</li>
 
35
<li><div class="fn"/>int <b><a href="qxmlattributes.html#index">index</a></b> ( const QString &amp; <i>qName</i> ) const</li>
 
36
<li><div class="fn"/>int <b><a href="qxmlattributes.html#index-2">index</a></b> ( const QString &amp; <i>uri</i>, const QString &amp; <i>localPart</i> ) const</li>
 
37
<li><div class="fn"/>int <b><a href="qxmlattributes.html#length">length</a></b> () const</li>
 
38
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#localName">localName</a></b> ( int <i>index</i> ) const</li>
 
39
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#qName">qName</a></b> ( int <i>index</i> ) const</li>
 
40
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#type">type</a></b> ( int <i>index</i> ) const</li>
 
41
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#type-2">type</a></b> ( const QString &amp; <i>qName</i> ) const</li>
 
42
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#type-3">type</a></b> ( const QString &amp; <i>uri</i>, const QString &amp; <i>localName</i> ) const</li>
 
43
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#uri">uri</a></b> ( int <i>index</i> ) const</li>
 
44
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#value">value</a></b> ( int <i>index</i> ) const</li>
 
45
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#value-2">value</a></b> ( const QString &amp; <i>qName</i> ) const</li>
 
46
<li><div class="fn"/>QString <b><a href="qxmlattributes.html#value-3">value</a></b> ( const QString &amp; <i>uri</i>, const QString &amp; <i>localName</i> ) const</li>
 
47
</ul>
 
48
<a name="details"></a>
 
49
<hr />
 
50
<h2>Detailed Description</h2>
 
51
<p>The QXmlAttributes class provides XML attributes.</p>
 
52
<p>If attributes are reported by <a href="qxmlcontenthandler.html#startElement">QXmlContentHandler::startElement</a>() this class is used to pass the attribute values.</p>
 
53
<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>
 
54
<hr />
 
55
<h2>Member Function Documentation</h2>
 
56
<h3 class="fn"><a name="QXmlAttributes"></a>QXmlAttributes::QXmlAttributes ()</h3>
 
57
<p>Constructs an empty attribute list.</p>
 
58
<h3 class="fn"><a name="dtor.QXmlAttributes"></a>QXmlAttributes::~QXmlAttributes ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
59
<p>Destroys the attributes object.</p>
 
60
<h3 class="fn"><a name="append"></a>void QXmlAttributes::append ( const <a href="qstring.html">QString</a> &amp; <i>qName</i>, const <a href="qstring.html">QString</a> &amp; <i>uri</i>, const <a href="qstring.html">QString</a> &amp; <i>localPart</i>, const <a href="qstring.html">QString</a> &amp; <i>value</i> )</h3>
 
61
<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>
 
62
<p>See also <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>
 
63
<h3 class="fn"><a name="clear"></a>void QXmlAttributes::clear ()</h3>
 
64
<p>Clears the list of attributes.</p>
 
65
<p>See also <a href="qxmlattributes.html#append">append</a>().</p>
 
66
<h3 class="fn"><a name="count"></a>int QXmlAttributes::count () const</h3>
 
67
<p>Returns the number of attributes in the list. This function is equivalent to <a href="qxmlattributes.html#length">length</a>().</p>
 
68
<h3 class="fn"><a name="index"></a>int QXmlAttributes::index ( const <a href="qstring.html">QString</a> &amp; <i>qName</i> ) const</h3>
 
69
<p>Looks up the index of an attribute by the qualified name <i>qName</i>.</p>
 
70
<p>Returns the index of the attribute or -1 if it wasn't found.</p>
 
71
<p>See also the <a href="xml.html#sax2namespaces">namespace description</a>.</p>
 
72
<h3 class="fn"><a name="index-2"></a>int QXmlAttributes::index ( const <a href="qstring.html">QString</a> &amp; <i>uri</i>, const <a href="qstring.html">QString</a> &amp; <i>localPart</i> ) const</h3>
 
73
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
74
<p>Looks up the index of an attribute by a namespace name.</p>
 
75
<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>
 
76
<p>Returns the index of the attribute, or -1 if it wasn't found.</p>
 
77
<p>See also the <a href="xml.html#sax2namespaces">namespace description</a>.</p>
 
78
<h3 class="fn"><a name="length"></a>int QXmlAttributes::length () const</h3>
 
79
<p>Returns the number of attributes in the list.</p>
 
80
<p>See also <a href="qxmlattributes.html#count">count</a>().</p>
 
81
<h3 class="fn"><a name="localName"></a><a href="qstring.html">QString</a> QXmlAttributes::localName ( int <i>index</i> ) const</h3>
 
82
<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>
 
83
<p>See also the <a href="xml.html#sax2namespaces">namespace description</a>.</p>
 
84
<h3 class="fn"><a name="qName"></a><a href="qstring.html">QString</a> QXmlAttributes::qName ( int <i>index</i> ) const</h3>
 
85
<p>Looks up an attribute's XML 1.0 qualified name for the attribute at position <i>index</i>.</p>
 
86
<p>See also the <a href="xml.html#sax2namespaces">namespace description</a>.</p>
 
87
<h3 class="fn"><a name="type"></a><a href="qstring.html">QString</a> QXmlAttributes::type ( int <i>index</i> ) const</h3>
 
88
<p>Looks up an attribute's type for the attribute at position <i>index</i>.</p>
 
89
<p>Currently only &quot;CDATA&quot; is returned.</p>
 
90
<h3 class="fn"><a name="type-2"></a><a href="qstring.html">QString</a> QXmlAttributes::type ( const <a href="qstring.html">QString</a> &amp; <i>qName</i> ) const</h3>
 
91
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
92
<p>Looks up an attribute's type for the qualified name <i>qName</i>.</p>
 
93
<p>Currently only &quot;CDATA&quot; is returned.</p>
 
94
<h3 class="fn"><a name="type-3"></a><a href="qstring.html">QString</a> QXmlAttributes::type ( const <a href="qstring.html">QString</a> &amp; <i>uri</i>, const <a href="qstring.html">QString</a> &amp; <i>localName</i> ) const</h3>
 
95
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
96
<p>Looks up an attribute's type by namespace name.</p>
 
97
<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>
 
98
<p>Currently only &quot;CDATA&quot; is returned.</p>
 
99
<h3 class="fn"><a name="uri"></a><a href="qstring.html">QString</a> QXmlAttributes::uri ( int <i>index</i> ) const</h3>
 
100
<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>
 
101
<p>See also the <a href="xml.html#sax2namespaces">namespace description</a>.</p>
 
102
<h3 class="fn"><a name="value"></a><a href="qstring.html">QString</a> QXmlAttributes::value ( int <i>index</i> ) const</h3>
 
103
<p>Returns an attribute's value for the attribute at position <i>index</i>. The index must be a valid position (i.e., 0 &lt;= <i>index</i> &lt; <a href="qxmlattributes.html#count">count</a>()).</p>
 
104
<h3 class="fn"><a name="value-2"></a><a href="qstring.html">QString</a> QXmlAttributes::value ( const <a href="qstring.html">QString</a> &amp; <i>qName</i> ) const</h3>
 
105
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
106
<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>
 
107
<p>See also the <a href="xml.html#sax2namespaces">namespace description</a>.</p>
 
108
<h3 class="fn"><a name="value-3"></a><a href="qstring.html">QString</a> QXmlAttributes::value ( const <a href="qstring.html">QString</a> &amp; <i>uri</i>, const <a href="qstring.html">QString</a> &amp; <i>localName</i> ) const</h3>
 
109
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
110
<p>Returns an attribute's value by namespace name.</p>
 
111
<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>
 
112
<p>See also the <a href="xml.html#sax2namespaces">namespace description</a>.</p>
 
113
<p /><address><hr /><div align="center">
 
114
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
115
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
116
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
117
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
118
</tr></table></div></address></body>
 
119
</html>