Imported Upstream version 1.51.0
[platform/upstream/boost.git] / doc / html / boost / property_tree / xml_parser / write_xml_id1168786.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function template write_xml</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="../../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="../../../property_tree/reference.html#header.boost.property_tree.xml_parser_hpp" title="Header &lt;boost/property_tree/xml_parser.hpp&gt;">
9 <link rel="prev" href="read_xml_id1161534.html" title="Function template read_xml">
10 <link rel="next" href="write_xml_id1168846.html" title="Function template write_xml">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="read_xml_id1161534.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../property_tree/reference.html#header.boost.property_tree.xml_parser_hpp"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="write_xml_id1168846.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.property_tree.xml_parser.write_xml_id1168786"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Function template write_xml</span></h2>
29 <p>boost::property_tree::xml_parser::write_xml</p>
30 </div>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../property_tree/reference.html#header.boost.property_tree.xml_parser_hpp" title="Header &lt;boost/property_tree/xml_parser.hpp&gt;">boost/property_tree/xml_parser.hpp</a>&gt;
33
34 </span>
35 <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Ptree<span class="special">&gt;</span> 
36   <span class="keyword">void</span> <span class="identifier">write_xml</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Ptree</span><span class="special">::</span><span class="identifier">key_type</span><span class="special">::</span><span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> stream<span class="special">,</span> 
37                  <span class="keyword">const</span> <span class="identifier">Ptree</span> <span class="special">&amp;</span> pt<span class="special">,</span> 
38                  <span class="keyword">const</span> <span class="identifier">xml_writer_settings</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Ptree</span><span class="special">::</span><span class="identifier">key_type</span><span class="special">::</span><span class="identifier">value_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> settings <span class="special">=</span> <span class="identifier">xml_writer_settings</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Ptree</span><span class="special">::</span><span class="identifier">key_type</span><span class="special">::</span><span class="identifier">value_type</span> <span class="special">&gt;</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></div>
39 <div class="refsect1">
40 <a name="id2627482"></a><h2>Description</h2>
41 <p>Translates the property tree to XML and writes it the given output stream. 
42
43 </p>
44 <div class="variablelist"><table border="0">
45 <col align="left" valign="top">
46 <tbody>
47 <tr>
48 <td><p><span class="term">Parameters:</span></p></td>
49 <td><div class="variablelist"><table border="0">
50 <col align="left" valign="top">
51 <tbody>
52 <tr>
53 <td><p><span class="term"><code class="computeroutput">pt</code></span></p></td>
54 <td><p>The property tree to tranlsate to XML and output. </p></td>
55 </tr>
56 <tr>
57 <td><p><span class="term"><code class="computeroutput">settings</code></span></p></td>
58 <td><p>The settings to use when writing out the property tree as XML. </p></td>
59 </tr>
60 <tr>
61 <td><p><span class="term"><code class="computeroutput">stream</code></span></p></td>
62 <td><p>The stream to which to write the XML representation of the property tree. </p></td>
63 </tr>
64 </tbody>
65 </table></div></td>
66 </tr>
67 <tr>
68 <td><p><span class="term">Throws:</span></p></td>
69 <td>xml_parser_error In case of error translating the property tree to XML or writing to the output stream. </td>
70 </tr>
71 </tbody>
72 </table></div>
73 </div>
74 </div>
75 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
76 <td align="left"></td>
77 <td align="right"><div class="copyright-footer">Copyright &#169; 2008 Marcin Kalicinski<p>
78         Distributed under the Boost Software License, Version 1.0. (See accompanying
79         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
80       </p>
81 </div></td>
82 </tr></table>
83 <hr>
84 <div class="spirit-nav">
85 <a accesskey="p" href="read_xml_id1161534.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../property_tree/reference.html#header.boost.property_tree.xml_parser_hpp"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="write_xml_id1168846.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
86 </div>
87 </body>
88 </html>