<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>libxml++: xmlpp::Document Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacexmlpp.html">xmlpp</a>::<a class="el" href="classxmlpp_1_1Document.html">Document</a> </div> </div> <div class="contents"> <h1>xmlpp::Document Class Reference</h1><!-- doxytag: class="xmlpp::Document" --><!-- doxytag: inherits="xmlpp::NonCopyable" -->Represents an XML document in the DOM model. <a href="#_details">More...</a> <p> <div class="dynheader"> Inheritance diagram for xmlpp::Document:</div> <div class="dynsection"> <p><center><img src="classxmlpp_1_1Document__inherit__graph.jpg" border="0" usemap="#xmlpp_1_1Document__inherit__map" alt="Inheritance graph"></center> <map name="xmlpp_1_1Document__inherit__map"> <area shape="rect" href="classxmlpp_1_1NonCopyable.html" title="Herited by classes which cannot be copied." alt="" coords="5,5,147,32"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classxmlpp_1_1Document-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Classes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><b>Init</b></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#8c5c6692e195dcf3aee88dc492f9efed">Document</a> (const Glib::ustring &version="1.0")</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#77c35c594fc9995970ae9c4f9d77496b">~Document</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::ustring </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#9527fadaffff6138b0b35050370a0e3d">get_encoding</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Dtd.html">Dtd</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#e27fb04b1760bcaa58f7e329c98fae47">get_internal_subset</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#714dc6c330ae6e00fb285606b8b849a4">set_internal_subset</a> (const Glib::ustring &name, const Glib::ustring &external_id, const Glib::ustring &system_id)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Element.html">Element</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#6f4ebd0db42eeca823517dd1bd56d009">get_root_node</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the root node. <a href="#6f4ebd0db42eeca823517dd1bd56d009"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Element.html">Element</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#8552403b511567241856148a6040be23">create_root_node</a> (const Glib::ustring &name, const Glib::ustring &ns_uri=Glib::ustring(), const Glib::ustring &ns_prefix=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates the root node. <a href="#8552403b511567241856148a6040be23"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Element.html">Element</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#8085d5e40537e2a674063cbddb39f0b8">create_root_node_by_import</a> (const <a class="el" href="classxmlpp_1_1Node.html">Node</a> *node, <a class="el" href="classbool.html">bool</a> recursive=true)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a root node by importing the node from another document, without affecting the source node. <a href="#8085d5e40537e2a674063cbddb39f0b8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1CommentNode.html">CommentNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#2d5ebd0f41215d54b9c96dd4ddb49ede">add_comment</a> (const Glib::ustring &content)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Append a new comment node. <a href="#2d5ebd0f41215d54b9c96dd4ddb49ede"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#dbbcae29bde29501f3dfff71f2e81da2">write_to_file</a> (const Glib::ustring &filename, const Glib::ustring &encoding=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write the document to a file. <a href="#dbbcae29bde29501f3dfff71f2e81da2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#e54075502d81e9d8448e6820bc16eb34">write_to_file_formatted</a> (const Glib::ustring &filename, const Glib::ustring &encoding=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write the document to a file. <a href="#e54075502d81e9d8448e6820bc16eb34"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::ustring </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#b63344d932c309062769fd98585e9bc1">write_to_string</a> (const Glib::ustring &encoding=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write the document to the memory. <a href="#b63344d932c309062769fd98585e9bc1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::ustring </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#c1246acf8c7b51855e9eb12eecefa294">write_to_string_formatted</a> (const Glib::ustring &encoding=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write the document to the memory. <a href="#c1246acf8c7b51855e9eb12eecefa294"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#55e593694bdcf67f667f1dbe52cd0794">write_to_stream</a> (<a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1basic__ostream.html">std::ostream</a> &output, const Glib::ustring &encoding=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write the document to a <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespacestd.html#ga3">std::ostream</a>. <a href="#55e593694bdcf67f667f1dbe52cd0794"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#dd90b2d2d0a837df3f3daec6bccaad2c">write_to_stream_formatted</a> (<a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1basic__ostream.html">std::ostream</a> &output, const Glib::ustring &encoding=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write the document to a <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespacestd.html#ga3">std::ostream</a>. <a href="#dd90b2d2d0a837df3f3daec6bccaad2c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#d56a99bd883672ba5eac51a545fada40">set_entity_declaration</a> (const Glib::ustring &name, <a class="el" href="namespacexmlpp.html#0fa47f0fb103cf9ea460a2fef3f5be49">XmlEntityType</a> type, const Glib::ustring &publicId, const Glib::ustring &systemId, const Glib::ustring &content)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add an Entity declaration to the document. <a href="#d56a99bd883672ba5eac51a545fada40"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">_xmlDoc * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#1ebb73b9ac51ca929bfd38f359964a59">cobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access the underlying libxml implementation. <a href="#1ebb73b9ac51ca929bfd38f359964a59"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const _xmlDoc * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#4cbdce4b14db6b3a393346b5e3034886">cobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access the underlying libxml implementation. <a href="#4cbdce4b14db6b3a393346b5e3034886"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">_xmlEntity * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#6772b76ee685c3755f8a19ce19f48f35">get_entity</a> (const Glib::ustring &name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve an Entity. <a href="#6772b76ee685c3755f8a19ce19f48f35"></a><br></td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#e7e7880266cdc1fcd455c018c64404ff">DomParser</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1Document.html#d804f0de41137fa28564abe53c8d27b1">SaxParser</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Represents an XML document in the DOM model. <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="8c5c6692e195dcf3aee88dc492f9efed"></a><!-- doxytag: member="xmlpp::Document::Document" ref="8c5c6692e195dcf3aee88dc492f9efed" args="(const Glib::ustring &version="1.0")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">xmlpp::Document::Document </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>version</em> = <code>"1.0"</code> </td> <td> ) </td> <td><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="77c35c594fc9995970ae9c4f9d77496b"></a><!-- doxytag: member="xmlpp::Document::~Document" ref="77c35c594fc9995970ae9c4f9d77496b" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual xmlpp::Document::~Document </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="2d5ebd0f41215d54b9c96dd4ddb49ede"></a><!-- doxytag: member="xmlpp::Document::add_comment" ref="2d5ebd0f41215d54b9c96dd4ddb49ede" args="(const Glib::ustring &content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1CommentNode.html">CommentNode</a>* xmlpp::Document::add_comment </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>content</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Append a new comment node. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>content</em> </td><td>The text. This should be unescaped - see <a class="el" href="classxmlpp_1_1ContentNode.html#2e9978caa82eb11cadccd4d5fc4e690a" title="Set the text of this content node.">ContentNode::set_content()</a>. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The new comment node. </dd></dl> </div> </div><p> <a class="anchor" name="4cbdce4b14db6b3a393346b5e3034886"></a><!-- doxytag: member="xmlpp::Document::cobj" ref="4cbdce4b14db6b3a393346b5e3034886" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const _xmlDoc* xmlpp::Document::cobj </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Access the underlying libxml implementation. <p> </div> </div><p> <a class="anchor" name="1ebb73b9ac51ca929bfd38f359964a59"></a><!-- doxytag: member="xmlpp::Document::cobj" ref="1ebb73b9ac51ca929bfd38f359964a59" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_xmlDoc* xmlpp::Document::cobj </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Access the underlying libxml implementation. <p> </div> </div><p> <a class="anchor" name="8552403b511567241856148a6040be23"></a><!-- doxytag: member="xmlpp::Document::create_root_node" ref="8552403b511567241856148a6040be23" args="(const Glib::ustring &name, const Glib::ustring &ns_uri=Glib::ustring(), const Glib::ustring &ns_prefix=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Element.html">Element</a>* xmlpp::Document::create_root_node </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_uri</em> = <code>Glib::ustring()</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>ns_prefix</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Creates the root node. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The node's name. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ns_uri</em> </td><td>The namespace URI. A namspace declaration will be added to this node, because it could not have been declared before. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ns_prefix</em> </td><td>The namespace prefix to associate with the namespace. If no namespace prefix is specified then the namespace URI will be the default namespace. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the new root node </dd></dl> </div> </div><p> <a class="anchor" name="8085d5e40537e2a674063cbddb39f0b8"></a><!-- doxytag: member="xmlpp::Document::create_root_node_by_import" ref="8085d5e40537e2a674063cbddb39f0b8" args="(const Node *node, bool recursive=true)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Element.html">Element</a>* xmlpp::Document::create_root_node_by_import </td> <td>(</td> <td class="paramtype">const <a class="el" href="classxmlpp_1_1Node.html">Node</a> * </td> <td class="paramname"> <em>node</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classbool.html">bool</a> </td> <td class="paramname"> <em>recursive</em> = <code>true</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Creates a root node by importing the node from another document, without affecting the source node. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>node</em> </td><td>The node to copy and insert as the root node of the document </td></tr> <tr><td valign="top"></td><td valign="top"><em>recursive</em> </td><td>Whether to import the child nodes also. Defaults to true. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the new root node </dd></dl> </div> </div><p> <a class="anchor" name="9527fadaffff6138b0b35050370a0e3d"></a><!-- doxytag: member="xmlpp::Document::get_encoding" ref="9527fadaffff6138b0b35050370a0e3d" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Glib::ustring xmlpp::Document::get_encoding </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The encoding used in the source from which the document has been loaded. </dd></dl> </div> </div><p> <a class="anchor" name="6772b76ee685c3755f8a19ce19f48f35"></a><!-- doxytag: member="xmlpp::Document::get_entity" ref="6772b76ee685c3755f8a19ce19f48f35" args="(const Glib::ustring &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">_xmlEntity* xmlpp::Document::get_entity </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em> </td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Retrieve an Entity. <p> The entity can be from an external subset or internally declared. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>Then name of the entity to get. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the libxml2 entity structure. </dd></dl> </div> </div><p> <a class="anchor" name="e27fb04b1760bcaa58f7e329c98fae47"></a><!-- doxytag: member="xmlpp::Document::get_internal_subset" ref="e27fb04b1760bcaa58f7e329c98fae47" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Dtd.html">Dtd</a>* xmlpp::Document::get_internal_subset </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="6f4ebd0db42eeca823517dd1bd56d009"></a><!-- doxytag: member="xmlpp::Document::get_root_node" ref="6f4ebd0db42eeca823517dd1bd56d009" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Element.html">Element</a>* xmlpp::Document::get_root_node </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Return the root node. <p> This function does _not_ create a default root node if it doesn't exist. <dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the root node if it exists, 0 otherwise. </dd></dl> </div> </div><p> <a class="anchor" name="d56a99bd883672ba5eac51a545fada40"></a><!-- doxytag: member="xmlpp::Document::set_entity_declaration" ref="d56a99bd883672ba5eac51a545fada40" args="(const Glib::ustring &name, XmlEntityType type, const Glib::ustring &publicId, const Glib::ustring &systemId, const Glib::ustring &content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void xmlpp::Document::set_entity_declaration </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespacexmlpp.html#0fa47f0fb103cf9ea460a2fef3f5be49">XmlEntityType</a> </td> <td class="paramname"> <em>type</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>publicId</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>systemId</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>content</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add an Entity declaration to the document. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the entity that will be used in an entity reference. </td></tr> <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>The type of entity. </td></tr> <tr><td valign="top"></td><td valign="top"><em>publicId</em> </td><td>The public ID of the subset. </td></tr> <tr><td valign="top"></td><td valign="top"><em>systemId</em> </td><td>The system ID of the subset. </td></tr> <tr><td valign="top"></td><td valign="top"><em>content</em> </td><td>The value of the Entity. In entity reference substitutions, this is the replacement value. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="714dc6c330ae6e00fb285606b8b849a4"></a><!-- doxytag: member="xmlpp::Document::set_internal_subset" ref="714dc6c330ae6e00fb285606b8b849a4" args="(const Glib::ustring &name, const Glib::ustring &external_id, const Glib::ustring &system_id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Document::set_internal_subset </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>external_id</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>system_id</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="dbbcae29bde29501f3dfff71f2e81da2"></a><!-- doxytag: member="xmlpp::Document::write_to_file" ref="dbbcae29bde29501f3dfff71f2e81da2" args="(const Glib::ustring &filename, const Glib::ustring &encoding=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Document::write_to_file </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>filename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>encoding</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Write the document to a file. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td></td></tr> <tr><td valign="top"></td><td valign="top"><em>encoding</em> </td><td>If not provided, UTF-8 is used </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="e54075502d81e9d8448e6820bc16eb34"></a><!-- doxytag: member="xmlpp::Document::write_to_file_formatted" ref="e54075502d81e9d8448e6820bc16eb34" args="(const Glib::ustring &filename, const Glib::ustring &encoding=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Document::write_to_file_formatted </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>filename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>encoding</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Write the document to a file. <p> The output is formatted by inserting whitespaces, which is easier to read for a human, but may insert unwanted significant whitespaces. Use with care ! <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td></td></tr> <tr><td valign="top"></td><td valign="top"><em>encoding</em> </td><td>If not provided, UTF-8 is used </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="55e593694bdcf67f667f1dbe52cd0794"></a><!-- doxytag: member="xmlpp::Document::write_to_stream" ref="55e593694bdcf67f667f1dbe52cd0794" args="(std::ostream &output, const Glib::ustring &encoding=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Document::write_to_stream </td> <td>(</td> <td class="paramtype"><a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1basic__ostream.html">std::ostream</a> & </td> <td class="paramname"> <em>output</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>encoding</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Write the document to a <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespacestd.html#ga3">std::ostream</a>. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>output</em> </td><td>A reference to the stream in which the document will be written </td></tr> <tr><td valign="top"></td><td valign="top"><em>encoding</em> </td><td>If not provided, UTF-8 is used </td></tr> </table> </dl> <dl class="warning" compact><dt><b>Warning:</b></dt><dd>This method is much less efficient than write_to_string if you want to dump the document to a buffer or the standard output. Writing to a fstream is almost as fast as write_to_file </dd></dl> </div> </div><p> <a class="anchor" name="dd90b2d2d0a837df3f3daec6bccaad2c"></a><!-- doxytag: member="xmlpp::Document::write_to_stream_formatted" ref="dd90b2d2d0a837df3f3daec6bccaad2c" args="(std::ostream &output, const Glib::ustring &encoding=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::Document::write_to_stream_formatted </td> <td>(</td> <td class="paramtype"><a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/classstd_1_1basic__ostream.html">std::ostream</a> & </td> <td class="paramname"> <em>output</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>encoding</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Write the document to a <a class="elRef" doxygen="libstdc++.tag.xml:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespacestd.html#ga3">std::ostream</a>. <p> The output is formatted by inserting whitespaces, which is easier to read for a human, but may insert unwanted significant whitespaces. Use with care ! <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>output</em> </td><td>A reference to the stream in which the document will be written </td></tr> <tr><td valign="top"></td><td valign="top"><em>encoding</em> </td><td>If not provided, UTF-8 is used </td></tr> </table> </dl> <dl class="warning" compact><dt><b>Warning:</b></dt><dd>See write_to_stream </dd></dl> </div> </div><p> <a class="anchor" name="b63344d932c309062769fd98585e9bc1"></a><!-- doxytag: member="xmlpp::Document::write_to_string" ref="b63344d932c309062769fd98585e9bc1" args="(const Glib::ustring &encoding=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Glib::ustring xmlpp::Document::write_to_string </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>encoding</em> = <code>Glib::ustring()</code> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Write the document to the memory. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>encoding</em> </td><td>If not provided, UTF-8 is used </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="c1246acf8c7b51855e9eb12eecefa294"></a><!-- doxytag: member="xmlpp::Document::write_to_string_formatted" ref="c1246acf8c7b51855e9eb12eecefa294" args="(const Glib::ustring &encoding=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Glib::ustring xmlpp::Document::write_to_string_formatted </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>encoding</em> = <code>Glib::ustring()</code> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Write the document to the memory. <p> The output is formatted by inserting whitespaces, which is easier to read for a human, but may insert unwanted significant whitespaces. Use with care ! <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>encoding</em> </td><td>If not provided, UTF-8 is used </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The written document. </dd></dl> </div> </div><p> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="e7e7880266cdc1fcd455c018c64404ff"></a><!-- doxytag: member="xmlpp::Document::DomParser" ref="e7e7880266cdc1fcd455c018c64404ff" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">friend class <a class="el" href="classxmlpp_1_1DomParser.html">DomParser</a><code> [friend]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="d804f0de41137fa28564abe53c8d27b1"></a><!-- doxytag: member="xmlpp::Document::SaxParser" ref="d804f0de41137fa28564abe53c8d27b1" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">friend class <a class="el" href="classxmlpp_1_1SaxParser.html">SaxParser</a><code> [friend]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="document_8h.html">document.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 27 17:07:24 2009 for libxml++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>