This file is indexed.

/usr/share/qt5/doc/qtxmlpatterns/qxmlresultitems.html is in qtxmlpatterns5-doc-html 5.3.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" />
<!-- qxmlresultitems.cpp -->
  <title>QXmlResultItems Class | QtXmlPatterns </title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.3</li>
<li><a href="qtxmlpatterns-index.html">Qt XML Patterns</a></li>
<li><a href="qtxmlpatterns-module.html">C++ Classes</a></li>
<li>QXmlResultItems</li>
<li id="buildversion">
Qt 5.3.2 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<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">QXmlResultItems Class</h1>
<!-- $$$QXmlResultItems-brief -->
<p>The QXmlResultItems class iterates through the results of evaluating an <a href="xmlprocessing.html">XQuery</a> in <a href="qxmlquery.html">QXmlQuery</a>. <a href="#details">More...</a></p>
<!-- @@@QXmlResultItems -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include &lt;QXmlResultItems&gt;</span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <tt>QT += xmlpatterns</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.4</td></tr></table><p><b>Note:</b> All functions in this class are reentrant.</p>
<ul>
<li><a href="qxmlresultitems-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="qxmlresultitems.html#QXmlResultItems">QXmlResultItems</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qxmlresultitems.html#dtor.QXmlResultItems">~QXmlResultItems</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QXmlItem </td><td class="memItemRight bottomAlign"><b><a href="qxmlresultitems.html#current">current</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlresultitems.html#hasError">hasError</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QXmlItem </td><td class="memItemRight bottomAlign"><b><a href="qxmlresultitems.html#next">next</a></b>()</td></tr>
</table>
<a name="details"></a>
<!-- $$$QXmlResultItems-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QXmlResultItems class iterates through the results of evaluating an <a href="xmlprocessing.html">XQuery</a> in <a href="qxmlquery.html">QXmlQuery</a>.</p>
<p>QXmlResultItems presents the evaluation of an associated query as a sequence of <a href="qxmlitem.html">QXmlItems</a>. The sequence is traversed by repeatedly calling <a href="qxmlresultitems.html#next">next</a>(), which actually produces the sequence by lazy evaluation of the query.</p>
<pre class="cpp"><span class="type"><a href="qxmlquery.html">QXmlQuery</a></span> query;
query<span class="operator">.</span>setQuery(<span class="string">&quot;&lt;e/&gt;, 1, 'two'&quot;</span>);
<span class="type">QXmlResultItems</span> result;

<span class="keyword">if</span> (query<span class="operator">.</span>isValid()) {
    query<span class="operator">.</span>evaluateTo(<span class="operator">&amp;</span>result);
    <span class="type"><a href="qxmlitem.html">QXmlItem</a></span> item(result<span class="operator">.</span>next());
    <span class="keyword">while</span> (<span class="operator">!</span>item<span class="operator">.</span>isNull()) {
        <span class="comment">// use item</span>
        item <span class="operator">=</span> result<span class="operator">.</span>next();
    }
    <span class="keyword">if</span> (result<span class="operator">.</span>hasError()) {
        <span class="comment">/* Runtime error! */</span>
    }
}</pre>
<p>An effect of letting <a href="qxmlresultitems.html#next">next</a>() produce the sequence by lazy evaluation is that a query error can occur on any call to <a href="qxmlresultitems.html#next">next</a>(). If an error occurs, both <a href="qxmlresultitems.html#next">next</a>() and <a href="qxmlresultitems.html#current">current</a>() will return the null <a href="qxmlitem.html">QXmlItem</a>, and <a href="qxmlresultitems.html#hasError">hasError</a>() will return true.</p>
<p>QXmlResultItems can be thought of as an &quot;iterator&quot; that traverses the sequence of query results once, in the forward direction. Each call to <a href="qxmlresultitems.html#next">next</a>() advances the iterator to the next <a href="qxmlitem.html">QXmlItem</a> in the sequence and returns it, and <a href="qxmlresultitems.html#current">current</a>() always returns the <a href="qxmlitem.html">QXmlItem</a> that <a href="qxmlresultitems.html#next">next</a>() returned the last time it was called.</p>
<p><b>Note: </b>When using the QXmlResultItems overload of <a href="qxmlquery.html#evaluateTo">QXmlQuery::evaluateTo</a>() to execute a query, it is advisable to create a new instance of this class for each new set of results rather than reusing an old instance.</p></div>
<p><b>See also </b><a href="qxmlitem.html#isNode">QXmlItem::isNode</a>(), <a href="qxmlitem.html#isAtomicValue">QXmlItem::isAtomicValue</a>(), and <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a>.</p>
<!-- @@@QXmlResultItems -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QXmlResultItems[overload1]$$$QXmlResultItems -->
<h3 class="fn"><a name="QXmlResultItems"></a>QXmlResultItems::<span class="name">QXmlResultItems</span>()</h3>
<p>Constructs an instance of <a href="qxmlresultitems.html">QXmlResultItems</a>.</p>
<!-- @@@QXmlResultItems -->
<!-- $$$~QXmlResultItems[overload1]$$$~QXmlResultItems -->
<h3 class="fn"><a name="dtor.QXmlResultItems"></a>QXmlResultItems::<span class="name">~QXmlResultItems</span>()<tt> [virtual]</tt></h3>
<p>Destroys this instance of <a href="qxmlresultitems.html">QXmlResultItems</a>.</p>
<!-- @@@~QXmlResultItems -->
<!-- $$$current[overload1]$$$current -->
<h3 class="fn"><a name="current"></a><span class="type"><a href="qxmlitem.html">QXmlItem</a></span> QXmlResultItems::<span class="name">current</span>() const</h3>
<p>Returns the current item. The current item is the last item that was produced and returned by <a href="qxmlresultitems.html#next">next</a>().</p>
<p>Returns a null <a href="qxmlitem.html">QXmlItem</a> if there is no associated <a href="qxmlquery.html">QXmlQuery</a>.</p>
<!-- @@@current -->
<!-- $$$hasError[overload1]$$$hasError -->
<h3 class="fn"><a name="hasError"></a><span class="type">bool</span> QXmlResultItems::<span class="name">hasError</span>() const</h3>
<p>If an error occurred during evaluation of the query, true is returned.</p>
<p>Returns false if query evaluation has been done.</p>
<!-- @@@hasError -->
<!-- $$$next[overload1]$$$next -->
<h3 class="fn"><a name="next"></a><span class="type"><a href="qxmlitem.html">QXmlItem</a></span> QXmlResultItems::<span class="name">next</span>()</h3>
<p>Returns the next result in the sequence produced by lazy evaluation of the associated query. When the returned <a href="qxmlitem.html">QXmlItem</a> is null, either the evaluation terminated normally without producing another result, or an error occurred. Call <a href="qxmlresultitems.html#hasError">hasError</a>() to determine whether the null item was caused by normal termination or by an error.</p>
<p>Returns a null <a href="qxmlitem.html">QXmlItem</a> if there is no associated <a href="qxmlquery.html">QXmlQuery</a>.</p>
<!-- @@@next -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2014 Digia Plc and/or its
   subsidiaries. Documentation contributions included herein are the copyrights of
   their respective owners.<br>    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.<br>    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. </p>
</div>
</body>
</html>