Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 7174

qt-doc-4.8.5-10.fc18.noarch.rpm

<?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" />
<!-- qxmlname.cpp -->
  <title>Qt 4.8: QXmlName Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <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="qtxmlpatterns.html">QtXmlPatterns</a></li>
<li>QXmlName</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></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="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#comparing-qxmlnames">Comparing QXmlNames</a></li>
</ul>
</div>
<h1 class="title">QXmlName Class Reference</h1>
<!-- $$$QXmlName-brief -->
<p>The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way. <a href="#details">More...</a></p>
<!-- @@@QXmlName -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QXmlName&gt;</span></pre><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.4.</p>
<ul>
<li><a href="qxmlname-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="qxmlname.html#QXmlName">QXmlName</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#QXmlName-2">QXmlName</a></b> ( QXmlNamePool &amp; <i>namePool</i>, const QString &amp; <i>localName</i>, const QString &amp; <i>namespaceURI</i> = QString(), const QString &amp; <i>prefix</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#localName">localName</a></b> ( const QXmlNamePool &amp; <i>namePool</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#namespaceUrix">namespaceUri</a></b> ( const QXmlNamePool &amp; <i>namePool</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#prefix">prefix</a></b> ( const QXmlNamePool &amp; <i>namePool</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#toClarkName">toClarkName</a></b> ( const QXmlNamePool &amp; <i>namePool</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#operator-not-eq">operator!=</a></b> ( const QXmlName &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QXmlName &amp; </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#operator-eq">operator=</a></b> ( const QXmlName &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#operator-eq-eq">operator==</a></b> ( const QXmlName &amp; <i>other</i> ) const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QXmlName </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#fromClarkName">fromClarkName</a></b> ( const QString &amp; <i>clarkName</i>, const QXmlNamePool &amp; <i>namePool</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#isNCName">isNCName</a></b> ( const QString &amp; <i>candidate</i> )</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qxmlname.html#qHash-20">qHash</a></b> ( const QXmlName &amp; <i>name</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QXmlName-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way.</p>
<p>QXmlName represents the name of an XML node in a way that is both efficient and safe for comparing names. Normally, an XML node represents an XML element or attribute, but QXmlName can also represent the names of other kinds of nodes, e.g&#x2e;, <a href="qabstractxmlreceiver.html#processingInstruction">QAbstractXmlReceiver::processingInstruction</a>() and <a href="qabstractxmlreceiver.html#namespaceBinding">QAbstractXmlReceiver::namespaceBinding</a>().</p>
<p>The name of an XML node has three components: The <i>namespace URI</i>, the <i>local name</i>, and the <i>prefix</i>. To see what these refer to in XML, consider the following snippet.</p>
<pre class="cpp"> &lt;book xmlns:dc='http://purl.org/dc/elements/1.1'
       xmlns='http://example.com/MyDefault'&gt;
     &lt;dc:title&gt;Mobey Dick&lt;/dc:title&gt; ...
 &lt;/book&gt;</pre>
<p>For the element named <i>book</i>, <a href="qxmlname.html#localName">localName</a>() returns <i>book</i>, <a href="qxmlname.html#namespaceUrix">namespaceUri</a>() returns <i>http://example.com/MyDefault</i>, and <a href="qxmlname.html#prefix">prefix</a>() returns an empty string. For the element named <i>title</i>, <a href="qxmlname.html#localName">localName</a>() returns <i>title</i>, <a href="qxmlname.html#namespaceUrix">namespaceUri</a>() returns <i>http://purl.org/dc/elements/1.1</i>, and <a href="qxmlname.html#prefix">prefix</a>() returns <i>dc</i>.</p>
<p>To ensure that operations with QXmlName are efficient, e.g&#x2e;, copying names and comparing them, each instance of QXmlName is associated with a <a href="qxmlnamepool.html">name pool</a>, which must be specified at QXmlName construction time. The three components of the QXmlName, i.e&#x2e;, the namespace URI, the local name, and the prefix, are stored in the name pool mapped to identifiers so they can be shared. For this reason, the only way to create a valid instance of QXmlName is to use the class constructor, where the <a href="qxmlnamepool.html">name pool</a>, local name, namespace URI, and prefix must all be specified.</p>
<p>Note that QXmlName's default constructor constructs a null instance. It is typically used for allocating unused entries in collections of QXmlName.</p>
<p>A side effect of associating each instance of QXmlName with a <a href="qxmlnamepool.html">name pool</a> is that each instance of QXmlName is tied to the <a href="qxmlnamepool.html">QXmlNamePool</a> with which it was created. However, the QXmlName class does not keep track of the name pool, so all the accessor functions, e.g&#x2e;, <a href="qxmlname.html#namespaceUrix">namespaceUri</a>(), <a href="qxmlname.html#prefix">prefix</a>(), <a href="qxmlname.html#localName">localName</a>(), and <a href="qxmlname.html#toClarkName">toClarkName</a>() require that the correct name pool be passed to them. Failure to provide the correct name pool to these accessor functions results in undefined behavior.</p>
<p>Note that a <a href="qxmlnamepool.html">name pool</a> is <i>not</i> an XML namespace. One <a href="qxmlnamepool.html">name pool</a> can represent instances of QXmlName from different XML namespaces, and the instances of QXmlName from one XML namespace can be distributed over multiple <a href="qxmlnamepool.html">name pools</a>.</p>
<a name="comparing-qxmlnames"></a><a name="comparing-qxmlnames"></a>
<h3>Comparing QXmlNames</h3>
<p>To determine what a QXmlName refers to, the <i>namespace URI</i> and the <i>local name</i> are used. The <i>prefix</i> is not used because the prefix is simply a shorthand name for use in place of the normally much longer namespace URI. Nor is the prefix used in name comparisons. For example, the following two element nodes represent the same element and compare equal.</p>
<pre class="cpp"> &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;/&gt;</pre>
<pre class="cpp"> &lt;x:svg xmlns:x=&quot;http://www.w3.org/2000/svg&quot;/&gt;</pre>
<p>Although the second name has the prefix <i>x</i>, the two names compare equal as instances of QXmlName, because the prefix is not used in the comparison.</p>
<p>A local name can never be an empty string, although the prefix and namespace URI can. If the prefix is not empty, the namespace URI cannot be empty. Local names and prefixes must be valid <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCNames</a>, e.g&#x2e;, <i>abc.def</i> or <i>abc123</i>.</p>
<p>QXmlName represents what is sometimes called an <i>expanded QName</i>, or simply a QName.</p>
</div>
<p><b>See also </b><a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">Namespaces in XML 1.0 (Second Edition), [4] NCName</a>.</p>
<!-- @@@QXmlName -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QXmlName[overload1]$$$QXmlName -->
<h3 class="fn"><a name="QXmlName"></a>QXmlName::<span class="name">QXmlName</span> ()</h3>
<p>Constructs an uninitialized <a href="qxmlname.html">QXmlName</a>. To build a valid <a href="qxmlname.html">QXmlName</a>, you normally use the other constructor, which takes a <a href="qxmlnamepool.html">name pool</a>, namespace URI, local name, and prefix as parameters. But you can also use this constructor to build a null <a href="qxmlname.html">QXmlName</a> and then assign an existing <a href="qxmlname.html">QXmlName</a> to it.</p>
<p><b>See also </b><a href="qxmlname.html#isNull">isNull</a>().</p>
<!-- @@@QXmlName -->
<!-- $$$QXmlName$$$QXmlNameQXmlNamePool&constQString&constQString&constQString& -->
<h3 class="fn"><a name="QXmlName-2"></a>QXmlName::<span class="name">QXmlName</span> ( <span class="type"><a href="qxmlnamepool.html">QXmlNamePool</a></span> &amp; <i>namePool</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>localName</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>namespaceURI</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>prefix</i> = QString() )</h3>
<p>Constructs a <a href="qxmlname.html">QXmlName</a> instance that inserts <i>localName</i>, <i>namespaceURI</i> and <i>prefix</i> into <i>namePool</i> if they aren't already there. The accessor functions <a href="qxmlname.html#namespaceUrix">namespaceUri</a>(), <a href="qxmlname.html#prefix">prefix</a>(), <a href="qxmlname.html#localName">localName</a>(), and <a href="qxmlname.html#toClarkName">toClarkName</a>() must be passed the <i>namePool</i> used here, so the <i>namePool</i> must remain in scope while the accessor functions might be used. However, two instances can be compared with <i>==</i> or <i>!=</i> and copied without the <i>namePool</i>.</p>
<p>The user guarantees that the string components are valid for a QName. In particular, the local name, and the prefix (if present), must be valid <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCNames</a>. The function <a href="qxmlname.html#isNCName">isNCName</a>() can be used to test validity of these names. The namespace URI should be an absolute URI. <a href="qurl.html#isRelative">QUrl::isRelative</a>() can be used to test whether the namespace URI is relative or absolute. Finally, providing a prefix is not valid when no namespace URI is provided.</p>
<p><i>namePool</i> is not copied. Nor is the reference to it retained in this instance. This constructor inserts the three strings into <i>namePool</i>.</p>
<!-- @@@QXmlName -->
<!-- $$$fromClarkName[overload1]$$$fromClarkNameconstQString&constQXmlNamePool& -->
<h3 class="fn"><a name="fromClarkName"></a><span class="type">QXmlName</span> QXmlName::<span class="name">fromClarkName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>clarkName</i>, const <span class="type"><a href="qxmlnamepool.html">QXmlNamePool</a></span> &amp; <i>namePool</i> )<tt> [static]</tt></h3>
<p>Converts <i>clarkName</i> into a <a href="qxmlname.html">QXmlName</a>, inserts into <i>namePool</i>, and returns it.</p>
<p>A clark name is a way to present a full QName with only one string, where the namespace cannot contain braces. Here are a couple of examples:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Clark Name</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td ><tt>html</tt></td><td >The local name <tt>html</tt>, in no namespace</td></tr>
<tr valign="top" class="even"><td ><tt>http://www.w3.org/1999/xhtml</tt>html</td><td >The local name <tt>html</tt>, in the XHTML namespace</td></tr>
<tr valign="top" class="odd"><td ><tt>http://www.w3.org/1999/xhtml</tt>my:html</td><td >The local name <tt>html</tt>, in the XHTML namespace, with the prefix <tt>my</tt></td></tr>
</table>
<p>If the namespace contains braces, the returned value is either invalid or has undefined content.</p>
<p>If <i>clarkName</i> is an invalid name, a default constructed <a href="qxmlname.html">QXmlName</a> is returned.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qxmlname.html#toClarkName">toClarkName</a>().</p>
<!-- @@@fromClarkName -->
<!-- $$$isNCName[overload1]$$$isNCNameconstQString& -->
<h3 class="fn"><a name="isNCName"></a><span class="type">bool</span> QXmlName::<span class="name">isNCName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>candidate</i> )<tt> [static]</tt></h3>
<p>Returns true if <i>candidate</i> is an <tt>NCName</tt>. An <tt>NCName</tt> is a string that can be used as a name in XML and <a href="xmlprocessing.html">XQuery</a>, e.g&#x2e;, the prefix or local name in an element or attribute, or the name of a variable.</p>
<p><b>See also </b><a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">Namespaces in XML 1.0 (Second Edition), [4] NCName</a>.</p>
<!-- @@@isNCName -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QXmlName::<span class="name">isNull</span> () const</h3>
<p>Returns true if this <a href="qxmlname.html">QXmlName</a> is not initialized with a valid combination of <i>namespace URI</i>, <i>local name</i>, and <i>prefix</i>.</p>
<p>A valid local name is always required. The prefix and namespace URI can be empty, but if the prefix is not empty, the namespace URI must not be empty. Local names and prefixes must be valid <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCNames</a>, e.g&#x2e;, <i>abc.def</i> or <i>abc123</i>.</p>
<!-- @@@isNull -->
<!-- $$$localName[overload1]$$$localNameconstQXmlNamePool& -->
<h3 class="fn"><a name="localName"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlName::<span class="name">localName</span> ( const <span class="type"><a href="qxmlnamepool.html">QXmlNamePool</a></span> &amp; <i>namePool</i> ) const</h3>
<p>Returns the local name.</p>
<p>Note that for efficiency, the local name string is not stored in the <a href="qxmlname.html">QXmlName</a> but in the <a href="qxmlnamepool.html">QXmlNamePool</a> that was passed to the constructor. Hence, that same <i>namePool</i> must be passed to this function, so it can be used for looking up the local name.</p>
<!-- @@@localName -->
<!-- $$$namespaceUri[overload1]$$$namespaceUriconstQXmlNamePool& -->
<h3 class="fn"><a name="namespaceUrix"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlName::<span class="name">namespaceUri</span> ( const <span class="type"><a href="qxmlnamepool.html">QXmlNamePool</a></span> &amp; <i>namePool</i> ) const</h3>
<p>Returns the namespace URI.</p>
<p>Note that for efficiency, the namespace URI string is not stored in the <a href="qxmlname.html">QXmlName</a> but in the <a href="qxmlnamepool.html">QXmlNamePool</a> that was passed to the constructor. Hence, that same <i>namePool</i> must be passed to this function, so it can be used for looking up the namespace URI.</p>
<!-- @@@namespaceUri -->
<!-- $$$prefix[overload1]$$$prefixconstQXmlNamePool& -->
<h3 class="fn"><a name="prefix"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlName::<span class="name">prefix</span> ( const <span class="type"><a href="qxmlnamepool.html">QXmlNamePool</a></span> &amp; <i>namePool</i> ) const</h3>
<p>Returns the prefix.</p>
<p>Note that for efficiency, the prefix string is not stored in the <a href="qxmlname.html">QXmlName</a> but in the <a href="qxmlnamepool.html">QXmlNamePool</a> that was passed to the constructor. Hence, that same <i>namePool</i> must be passed to this function, so it can be used for looking up the prefix.</p>
<!-- @@@prefix -->
<!-- $$$toClarkName[overload1]$$$toClarkNameconstQXmlNamePool& -->
<h3 class="fn"><a name="toClarkName"></a><span class="type"><a href="qstring.html">QString</a></span> QXmlName::<span class="name">toClarkName</span> ( const <span class="type"><a href="qxmlnamepool.html">QXmlNamePool</a></span> &amp; <i>namePool</i> ) const</h3>
<p>Returns this <a href="qxmlname.html">QXmlName</a> formatted as a Clark Name. For example, if the local name is <tt>html</tt>, the prefix is <tt>x</tt>, and the namespace URI is <tt>http://www.w3.org/1999/xhtml/</tt>, then the Clark Name returned is:</p>
<pre class="cpp"> {http:<span class="comment">//www.w3.org/1999/xhtml/}x:html.</span></pre>
<p>If the local name is <i>MyWidget</i> and the namespace is empty, the Clark Name returned is:</p>
<pre class="cpp"> MyWidget</pre>
<p>Note that for efficiency, the namespace URI, local name, and prefix strings are not stored in the <a href="qxmlname.html">QXmlName</a> but in the <a href="qxmlnamepool.html">QXmlNamePool</a> that was passed to the constructor. Hence, that same <i>namePool</i> must be passed to this function, so it can be used for looking up the three string components.</p>
<p>This function can be useful for debugging.</p>
<p><b>See also </b><a href="http://www.jclark.com/xml/xmlns.htm">XML Namespaces, James Clark</a> and <a href="qxmlname.html#fromClarkName">fromClarkName</a>().</p>
<!-- @@@toClarkName -->
<!-- $$$operator!=[overload1]$$$operator!=constQXmlName& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QXmlName::<span class="name">operator!=</span> ( const <span class="type">QXmlName</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qxmlname.html">QXmlName</a> is <i>not</i> equal to <i>other</i>; otherwise false. Two QXmlNames are equal if their namespace URIs are the same <i>and</i> their local names are the same. They are not equal if either their namespace URIs differ or their local names differ. Their prefixes are ignored.</p>
<p>Note that it is meaningless to compare two instances of <a href="qxmlname.html">QXmlName</a> that were created with different <a href="qxmlnamepool.html">name pools</a>, but the attempt is not detected and the behavior is undefined.</p>
<p><b>See also </b><a href="qxmlname.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQXmlName& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QXmlName</span> &amp; QXmlName::<span class="name">operator=</span> ( const <span class="type">QXmlName</span> &amp; <i>other</i> )</h3>
<p>Assigns <i>other</i> to <i>this</i> and returns <i>this</i>.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQXmlName& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QXmlName::<span class="name">operator==</span> ( const <span class="type">QXmlName</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qxmlname.html">QXmlName</a> is equal to <i>other</i>; otherwise false. Two QXmlNames are equal if their namespace URIs are the same <i>and</i> their local names are the same. The prefixes are ignored.</p>
<p>Note that it is meaningless to compare two instances of <a href="qxmlname.html">QXmlName</a> that were created with different <a href="qxmlnamepool.html">name pools</a>, but the attempt is not detected and the behavior is undefined.</p>
<p><b>See also </b><a href="qxmlname.html#operator-not-eq">operator!=</a>().</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$qHash$$$qHashconstQXmlName& -->
<h3 class="fn"><a name="qHash-20"></a><span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <span class="name">qHash</span> ( const <span class="type">QXmlName</span> &amp; <i>name</i> )</h3>
<p>Computes a hash key from the local name and the namespace URI in <i>name</i>. The prefix in <i>name</i> is not used in the computation.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@qHash -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc 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>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      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>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>