⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qxmlattributes.html

📁 QT 下载资料仅供参考
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/src/xml/qxml.cpp:635 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QXmlAttributes Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">Home</font></a> | <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a> | <a href="functions.html"><font color="#004faf">Functions</font></a></td><td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QXmlAttributes Class Reference<br><small>[<a href="xml.html">XML module</a>]</small></h1><p>The QXmlAttributes class provides XML attributes.<a href="#details">More...</a><p><tt>#include &lt;<a href="qxml-h.html">qxml.h</a>&gt;</tt><p><a href="qxmlattributes-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#QXmlAttributes"><b>QXmlAttributes</b></a> ()</div></li><li><div class=fn>virtual <a href="#~QXmlAttributes"><b>~QXmlAttributes</b></a> ()</div></li><li><div class=fn>int <a href="#index"><b>index</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;qName ) const</div></li><li><div class=fn>int <a href="#index-2"><b>index</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;uri, const&nbsp;QString&nbsp;&amp;&nbsp;localPart ) const</div></li><li><div class=fn>int <a href="#length"><b>length</b></a> () const</div></li><li><div class=fn>int <a href="#count"><b>count</b></a> () const</div></li><li><div class=fn>QString <a href="#localName"><b>localName</b></a> ( int&nbsp;index ) const</div></li><li><div class=fn>QString <a href="#qName"><b>qName</b></a> ( int&nbsp;index ) const</div></li><li><div class=fn>QString <a href="#uri"><b>uri</b></a> ( int&nbsp;index ) const</div></li><li><div class=fn>QString <a href="#type"><b>type</b></a> ( int&nbsp;index ) const</div></li><li><div class=fn>QString <a href="#type-2"><b>type</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;qName ) const</div></li><li><div class=fn>QString <a href="#type-3"><b>type</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;uri, const&nbsp;QString&nbsp;&amp;&nbsp;localName ) const</div></li><li><div class=fn>QString <a href="#value"><b>value</b></a> ( int&nbsp;index ) const</div></li><li><div class=fn>QString <a href="#value-2"><b>value</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;qName ) const</div></li><li><div class=fn>QString <a href="#value-3"><b>value</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;uri, const&nbsp;QString&nbsp;&amp;&nbsp;localName ) const</div></li><li><div class=fn>void <a href="#clear"><b>clear</b></a> ()</div></li><li><div class=fn>void <a href="#append"><b>append</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;qName, const&nbsp;QString&nbsp;&amp;&nbsp;uri, const&nbsp;QString&nbsp;&amp;&nbsp;localPart, const&nbsp;QString&nbsp;&amp;&nbsp;value )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The QXmlAttributes class provides XML attributes.<p> <p> If attributes are reported by <a href="qxmlcontenthandler.html#startElement">QXmlContentHandler::startElement</a>() thisclass is used to pass the attribute values.<p> Use <a href="#index">index</a>() to locate the position of an attribute in the list,<a href="#count">count</a>() to retrieve the number of attributes, and <a href="#clear">clear</a>() toremove the attributes. New attributes can be added with <a href="#append">append</a>().Use <a href="#type">type</a>() to get an attribute's type and <a href="#value">value</a>() to get itsvalue. The attribute's name is available from <a href="#localName">localName</a>() or<a href="#qName">qName</a>(), and its namespace URI from <a href="#uri">uri</a>().<p> <p>See also <a href="xml-tools.html">XML</a>.<hr><h2>Member Function Documentation</h2><h3 class=fn><a name="QXmlAttributes"></a>QXmlAttributes::QXmlAttributes ()</h3><p> Constructs an empty attribute list.<h3 class=fn><a name="~QXmlAttributes"></a>QXmlAttributes::~QXmlAttributes ()<tt> [virtual]</tt></h3><p> Destroys the attributes object.<h3 class=fn>void <a name="append"></a>QXmlAttributes::append ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;qName, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;uri, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;localPart, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;value )</h3>Appends a new attribute entry to the list of attributes. The qualified nameof the attribute is <em>qName</em>, the namespae URI is <em>uri</em> and the local nameis <em>localPart</em>. The value of the attribute is <em>value</em>.<p> <p>See also <a href="#qName">qName</a>(), <a href="#uri">uri</a>(), <a href="#localName">localName</a>() and <a href="#value">value</a>().<h3 class=fn>void <a name="clear"></a>QXmlAttributes::clear ()</h3>Clears the list of attributes.<p> <p>See also <a href="#append">append</a>().<h3 class=fn>int <a name="count"></a>QXmlAttributes::count () const</h3><p> Returns the number of attributes in the list. This function is equivalent to<a href="#length">length</a>().<h3 class=fn>int <a name="index"></a>QXmlAttributes::index ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;qName ) const</h3>Looks up the index of an attribute by the qualified name <em>qName</em>.<p> Returns the index of the attribute or -1 if it wasn't found.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<h3 class=fn>int <a name="index-2"></a>QXmlAttributes::index ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;uri, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;localPart ) const</h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Looks up the index of an attribute by a namespace name.<p> <em>uri</em> specifies the namespace URI, or an empty string if the name has nonamespace URI. <em>localPart</em> specifies the attribute's local name.<p> Returns the index of the attribute -1 if it wasn't found.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<h3 class=fn>int <a name="length"></a>QXmlAttributes::length () const</h3>Returns the number of attributes in the list.<p>Example: <a href="tagreader-with-features-example.html#x1953">xml/tagreader-with-features/structureparser.cpp</a>.<h3 class=fn><a href="qstring.html">QString</a> <a name="localName"></a>QXmlAttributes::localName ( int&nbsp;index ) const</h3>Looks up an attribute's local name for the attribute at position <em>index</em>. If no namespace processing is done, the local name is a nullstring.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<h3 class=fn><a href="qstring.html">QString</a> <a name="qName"></a>QXmlAttributes::qName ( int&nbsp;index ) const</h3>Looks up an attribute's XML 1.0 qualified name for the attribute atposition <em>index</em>.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<p>Example: <a href="qlistview.html#x2074">xml/tagreader-with-features/structureparser.cpp</a>.<h3 class=fn><a href="qstring.html">QString</a> <a name="type"></a>QXmlAttributes::type ( int&nbsp;index ) const</h3>Looks up an attribute's type for the attribute at position <em>index</em>.<p> Currently only "CDATA" is returned.<h3 class=fn><a href="qstring.html">QString</a> <a name="type-2"></a>QXmlAttributes::type ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;qName ) const</h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Looks up an attribute's type for the qualified name <em>qName</em>.<p> Currently only "CDATA" is returned.<h3 class=fn><a href="qstring.html">QString</a> <a name="type-3"></a>QXmlAttributes::type ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;uri, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;localName ) const</h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Looks up an attribute's type by namespace name.<p> <em>uri</em> specifies the namespace URI and <em>localName</em> specifies the local name.If the name has no namespace URI, use an empty string for <em>uri</em>.<p> Currently only "CDATA" is returned.<h3 class=fn><a href="qstring.html">QString</a> <a name="uri"></a>QXmlAttributes::uri ( int&nbsp;index ) const</h3>Looks up an attribute's namespace URI for the attribute at position <em>index</em>.If no namespace processing is done or if the attribute has no namespace,the namespace URI is a null string.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<p>Example: <a href="qlistview.html#x2075">xml/tagreader-with-features/structureparser.cpp</a>.<h3 class=fn><a href="qstring.html">QString</a> <a name="value"></a>QXmlAttributes::value ( int&nbsp;index ) const</h3>Looks up an attribute's value for the attribute at position <em>index</em>.<h3 class=fn><a href="qstring.html">QString</a> <a name="value-2"></a>QXmlAttributes::value ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;qName ) const</h3>  This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Looks up an attribute's value for the qualified name <em>qName</em>.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<h3 class=fn><a href="qstring.html">QString</a> <a name="value-3"></a>QXmlAttributes::value ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;uri, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;localName ) const</h3>  This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Looks up an attribute's value by namespace name.<p> <em>uri</em> specifies the namespace URI, or an empty string if the name has nonamespace URI. <em>localName</em> specifies the attribute's local name.<p> See also the <a href="xml.html#sax2Namespaces">namespace description</a>.<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright &copy; 1995-2002<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center><table width=100% cellspacing=0 border=0><tr><td>Copyright &copy; 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -