This file is indexed.

/usr/share/qt5/doc/qtxmlpatterns/qxmlserializer.html is in qtxmlpatterns5-doc-html 5.2.1-3.

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
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
<?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" />
<!-- qxmlserializer.cpp -->
  <title>QXmlSerializer 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.2</li>
<li><a href="qtxmlpatterns-index.html">Qt XML Patterns</a></li>
<li><a href="qtxmlpatterns-module.html">C++ Classes</a></li>
<li>QXmlSerializer</li>
<li id="buildversion">
Qt 5.2.1 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">QXmlSerializer Class</h1>
<!-- $$$QXmlSerializer-brief -->
<p>The QXmlSerializer class is an implementation of <a href="qabstractxmlreceiver.html">QAbstractXmlReceiver</a> for transforming <a href="xmlprocessing.html">XQuery</a> output into unformatted XML. <a href="#details">More...</a></p>
<!-- @@@QXmlSerializer -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include &lt;QXmlSerializer&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><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qabstractxmlreceiver.html">QAbstractXmlReceiver</a>.</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qxmlformatter.html">QXmlFormatter</a>.</p>
</td></tr></table><p><b>Note:</b> All functions in this class are reentrant.</p>
<ul>
<li><a href="qxmlserializer-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="qxmlserializer.html#QXmlSerializer">QXmlSerializer</a></b>(const QXmlQuery &amp;<i> query</i>, QIODevice *<i> outputDevice</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QTextCodec * </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#codec">codec</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIODevice * </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#outputDevice">outputDevice</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#setCodec">setCodec</a></b>(const QTextCodec *<i> outputCodec</i>)</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#atomicValue">atomicValue</a></b>(const QVariant &amp;<i> value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#attribute">attribute</a></b>(const QXmlName &amp;<i> name</i>, const QStringRef &amp;<i> value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#characters">characters</a></b>(const QStringRef &amp;<i> value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#comment">comment</a></b>(const QString &amp;<i> value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#endDocument">endDocument</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#endElement">endElement</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#endOfSequence">endOfSequence</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#namespaceBinding">namespaceBinding</a></b>(const QXmlName &amp;<i> nb</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#processingInstruction">processingInstruction</a></b>(const QXmlName &amp;<i> name</i>, const QString &amp;<i> value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#startDocument">startDocument</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#startElement">startElement</a></b>(const QXmlName &amp;<i> name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qxmlserializer.html#startOfSequence">startOfSequence</a></b>()</td></tr>
</table>
<ul>
<li class="fn">12 public functions inherited from <a href="qabstractxmlreceiver.html#public-functions">QAbstractXmlReceiver</a></li>
</ul>
<a name="details"></a>
<!-- $$$QXmlSerializer-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QXmlSerializer class is an implementation of <a href="qabstractxmlreceiver.html">QAbstractXmlReceiver</a> for transforming <a href="xmlprocessing.html">XQuery</a> output into unformatted XML.</p>
<p>QXmlSerializer translates an <a href="qabstractxmlreceiver.html#xquery-sequence">XQuery sequence</a>, usually the output of an <a href="qxmlquery.html">QXmlQuery</a>, into XML. Consider the example:</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;doc('index.html')/html/body/p[1]&quot;</span>);

<span class="type">QXmlSerializer</span> serializer(query<span class="operator">,</span> myOutputDevice);
query<span class="operator">.</span>evaluateTo(<span class="operator">&amp;</span>serializer);</pre>
<p>First it constructs a <a href="qxmlquery.html">query</a> that gets the first paragraph from document <tt>index.html</tt>. Then it constructs an instance of this class with the <a href="qxmlquery.html">query</a> and myOutputDevice. Finally, it <a href="qxmlquery.html#evaluateTo">evaluates</a> the <a href="qxmlquery.html">query</a>, producing an ordered sequence of calls to the serializer's callback functions. The sequence of callbacks transforms the query output to XML and writes it to myOutputDevice.</p>
<p>QXmlSerializer will:</p>
<ul>
<li>Declare namespaces when needed,</li>
<li>Use appropriate escaping, when characters can't be represented in the XML,</li>
<li>Handle line endings appropriately,</li>
<li>Report errors, when it can't serialize the content, e.g&#x2e;, when asked to serialize an attribute that is a top-level node, or when more than one top-level element is encountered.</li>
</ul>
<p>If an error occurs during serialization, result is undefined unless the serializer is driven through a call to <a href="qxmlquery.html#evaluateTo">QXmlQuery::evaluateTo</a>().</p>
<p>If the generated XML should be indented and formatted for reading, use <a href="qxmlformatter.html">QXmlFormatter</a>.</p>
</div>
<p><b>See also </b><a href="http://www.w3.org/TR/xslt-xquery-serialization/">XSLT 2.0 and XQuery 1.0 Serialization</a> and <a href="qxmlformatter.html">QXmlFormatter</a>.</p>
<!-- @@@QXmlSerializer -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QXmlSerializer[overload1]$$$QXmlSerializerconstQXmlQuery&QIODevice* -->
<h3 class="fn"><a name="QXmlSerializer"></a>QXmlSerializer::<span class="name">QXmlSerializer</span>(const <span class="type"><a href="qxmlquery.html">QXmlQuery</a></span> &amp;<i> query</i>, <span class="type">QIODevice</span> *<i> outputDevice</i>)</h3>
<p>Constructs a serializer that uses the name pool and message handler in <i>query</i>, and writes the output to <i>outputDevice</i>.</p>
<p><i>outputDevice</i> must be a valid, non-null device that is open in write mode, otherwise behavior is undefined.</p>
<p><i>outputDevice</i> must not be opened with QIODevice::Text because it will cause the output to be incorrect. This class will ensure line endings are serialized as according with the XML specification. <a href="qxmlserializer.html">QXmlSerializer</a> does not take ownership of <i>outputDevice</i>.</p>
<!-- @@@QXmlSerializer -->
<!-- $$$atomicValue[overload1]$$$atomicValueconstQVariant& -->
<h3 class="fn"><a name="atomicValue"></a><span class="type">void</span> QXmlSerializer::<span class="name">atomicValue</span>(const <span class="type">QVariant</span> &amp;<i> value</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#atomicValue">QAbstractXmlReceiver::atomicValue</a>().</p>
<!-- @@@atomicValue -->
<!-- $$$attribute[overload1]$$$attributeconstQXmlName&constQStringRef& -->
<h3 class="fn"><a name="attribute"></a><span class="type">void</span> QXmlSerializer::<span class="name">attribute</span>(const <span class="type"><a href="qxmlname.html">QXmlName</a></span> &amp;<i> name</i>, const <span class="type">QStringRef</span> &amp;<i> value</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#attribute">QAbstractXmlReceiver::attribute</a>().</p>
<!-- @@@attribute -->
<!-- $$$characters[overload1]$$$charactersconstQStringRef& -->
<h3 class="fn"><a name="characters"></a><span class="type">void</span> QXmlSerializer::<span class="name">characters</span>(const <span class="type">QStringRef</span> &amp;<i> value</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#characters">QAbstractXmlReceiver::characters</a>().</p>
<!-- @@@characters -->
<!-- $$$codec[overload1]$$$codec -->
<h3 class="fn"><a name="codec"></a>const <span class="type">QTextCodec</span> * QXmlSerializer::<span class="name">codec</span>() const</h3>
<p>Returns the codec being used by the serializer for encoding its XML output.</p>
<p><b>See also </b><a href="qxmlserializer.html#setCodec">setCodec</a>().</p>
<!-- @@@codec -->
<!-- $$$comment[overload1]$$$commentconstQString& -->
<h3 class="fn"><a name="comment"></a><span class="type">void</span> QXmlSerializer::<span class="name">comment</span>(const <span class="type">QString</span> &amp;<i> value</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#comment">QAbstractXmlReceiver::comment</a>().</p>
<!-- @@@comment -->
<!-- $$$endDocument[overload1]$$$endDocument -->
<h3 class="fn"><a name="endDocument"></a><span class="type">void</span> QXmlSerializer::<span class="name">endDocument</span>()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#endDocument">QAbstractXmlReceiver::endDocument</a>().</p>
<!-- @@@endDocument -->
<!-- $$$endElement[overload1]$$$endElement -->
<h3 class="fn"><a name="endElement"></a><span class="type">void</span> QXmlSerializer::<span class="name">endElement</span>()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#endElement">QAbstractXmlReceiver::endElement</a>().</p>
<!-- @@@endElement -->
<!-- $$$endOfSequence[overload1]$$$endOfSequence -->
<h3 class="fn"><a name="endOfSequence"></a><span class="type">void</span> QXmlSerializer::<span class="name">endOfSequence</span>()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#endOfSequence">QAbstractXmlReceiver::endOfSequence</a>().</p>
<!-- @@@endOfSequence -->
<!-- $$$namespaceBinding[overload1]$$$namespaceBindingconstQXmlName& -->
<h3 class="fn"><a name="namespaceBinding"></a><span class="type">void</span> QXmlSerializer::<span class="name">namespaceBinding</span>(const <span class="type"><a href="qxmlname.html">QXmlName</a></span> &amp;<i> nb</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#namespaceBinding">QAbstractXmlReceiver::namespaceBinding</a>().</p>
<!-- @@@namespaceBinding -->
<!-- $$$outputDevice[overload1]$$$outputDevice -->
<h3 class="fn"><a name="outputDevice"></a><span class="type">QIODevice</span> * QXmlSerializer::<span class="name">outputDevice</span>() const</h3>
<p>Returns a pointer to the output device. There is no corresponding function to <i>set</i> the output device, because the output device must be passed to the constructor. The serializer does not take ownership of its IO device.</p>
<!-- @@@outputDevice -->
<!-- $$$processingInstruction[overload1]$$$processingInstructionconstQXmlName&constQString& -->
<h3 class="fn"><a name="processingInstruction"></a><span class="type">void</span> QXmlSerializer::<span class="name">processingInstruction</span>(const <span class="type"><a href="qxmlname.html">QXmlName</a></span> &amp;<i> name</i>, const <span class="type">QString</span> &amp;<i> value</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#processingInstruction">QAbstractXmlReceiver::processingInstruction</a>().</p>
<!-- @@@processingInstruction -->
<!-- $$$setCodec[overload1]$$$setCodecconstQTextCodec* -->
<h3 class="fn"><a name="setCodec"></a><span class="type">void</span> QXmlSerializer::<span class="name">setCodec</span>(const <span class="type">QTextCodec</span> *<i> outputCodec</i>)</h3>
<p>Sets the codec the serializer will use for encoding its XML output. The output codec is set to <i>outputCodec</i>. By default, the output codec is set to the one for <tt>UTF-8</tt>. The serializer does not take ownership of the codec.</p>
<p><b>See also </b><a href="qxmlserializer.html#codec">codec</a>().</p>
<!-- @@@setCodec -->
<!-- $$$startDocument[overload1]$$$startDocument -->
<h3 class="fn"><a name="startDocument"></a><span class="type">void</span> QXmlSerializer::<span class="name">startDocument</span>()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#startDocument">QAbstractXmlReceiver::startDocument</a>().</p>
<!-- @@@startDocument -->
<!-- $$$startElement[overload1]$$$startElementconstQXmlName& -->
<h3 class="fn"><a name="startElement"></a><span class="type">void</span> QXmlSerializer::<span class="name">startElement</span>(const <span class="type"><a href="qxmlname.html">QXmlName</a></span> &amp;<i> name</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#startElement">QAbstractXmlReceiver::startElement</a>().</p>
<!-- @@@startElement -->
<!-- $$$startOfSequence[overload1]$$$startOfSequence -->
<h3 class="fn"><a name="startOfSequence"></a><span class="type">void</span> QXmlSerializer::<span class="name">startOfSequence</span>()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractxmlreceiver.html#startOfSequence">QAbstractXmlReceiver::startOfSequence</a>().</p>
<!-- @@@startOfSequence -->
</div>
        </div>
       </div>
   </div>
   </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.<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>