<!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::DomParser Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.5 --> <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="classes.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="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</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_1DomParser.html">DomParser</a> </div> </div> <div class="contents"> <h1>xmlpp::DomParser Class Reference</h1><!-- doxytag: class="xmlpp::DomParser" --><!-- doxytag: inherits="xmlpp::Parser" -->XML DOM parser. <a href="#_details">More...</a> <p> <div class="dynheader"> Inheritance diagram for xmlpp::DomParser:</div> <div class="dynsection"> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classxmlpp_1_1DomParser-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></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_1DomParser.html#beab430d4863459b6d03fc7e97363df5">DomParser</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1DomParser.html#9538baed354098e8ac73f69e1d4f55e5">DomParser</a> (const <a class="elRef" doxygen="glibmm_doxygen_tags:http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/" href="http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> &filename, <a class="el" href="classbool.html">bool</a> validate=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Instantiate the parser and parse a document immediately. <a href="#9538baed354098e8ac73f69e1d4f55e5"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1DomParser.html#3a18958b3980fb3ff44441868da7cb6a">~DomParser</a> ()</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_1DomParser.html#437c91bb64033669649d91f28ecc7dc9">parse_file</a> (const <a class="elRef" doxygen="glibmm_doxygen_tags:http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/" href="http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> &filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a file. <a href="#437c91bb64033669649d91f28ecc7dc9"></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_1DomParser.html#2110398d5a19320e7bbe65e0edb2ab9c">parse_memory</a> (const <a class="elRef" doxygen="glibmm_doxygen_tags:http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/" href="http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> &contents)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a string. <a href="#2110398d5a19320e7bbe65e0edb2ab9c"></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_1DomParser.html#ae7bd491f8aae685900bec03ec43d855">parse_memory_raw</a> (const unsigned char *contents, <a class="el" href="classxmlpp_1_1Parser.html#8e7c797006bb5398629cf98f4141e3e6">size_type</a> bytes_count)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from raw memory. <a href="#ae7bd491f8aae685900bec03ec43d855"></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_1DomParser.html#3d02d6c5b4194b47118e92a8e258743c">parse_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__istream.html">std::istream</a> &in)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a stream. <a href="#3d02d6c5b4194b47118e92a8e258743c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1DomParser.html#f6455076d91fc65e39f82e9a6c7ad764">operator bool</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Test whether a document has been parsed. <a href="#f6455076d91fc65e39f82e9a6c7ad764"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Document.html">Document</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1DomParser.html#d10907d495f9e1e2b63638a9c69f78a8">get_document</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classxmlpp_1_1Document.html">Document</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1DomParser.html#4a3452e46cf656998d8752ed949239de">get_document</a> () const </td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></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_1DomParser.html#0f77c8ab0a9ab2d7abd809846ae75d6f">parse_context</a> ()</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_1DomParser.html#58a312db2834a41a77ca290dc6dc48fe">release_underlying</a> ()</td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classxmlpp_1_1Document.html">Document</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1DomParser.html#b95c1209f2311df8fe1f1f34651d2d28">doc_</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> XML DOM parser. <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="beab430d4863459b6d03fc7e97363df5"></a><!-- doxytag: member="xmlpp::DomParser::DomParser" ref="beab430d4863459b6d03fc7e97363df5" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">xmlpp::DomParser::DomParser </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="9538baed354098e8ac73f69e1d4f55e5"></a><!-- doxytag: member="xmlpp::DomParser::DomParser" ref="9538baed354098e8ac73f69e1d4f55e5" args="(const Glib::ustring &filename, bool validate=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">xmlpp::DomParser::DomParser </td> <td>(</td> <td class="paramtype">const <a class="elRef" doxygen="glibmm_doxygen_tags:http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/" href="http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"> <em>filename</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>validate</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Instantiate the parser and parse a document immediately. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxmlpp_1_1exception.html" title="Base class for all xmlpp exceptions.">exception</a></em> </td><td></td></tr> </table> </dl> <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>The path to the file. </td></tr> <tr><td valign="top"></td><td valign="top"><em>validate</em> </td><td>Whether the parser should validate the XML. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="3a18958b3980fb3ff44441868da7cb6a"></a><!-- doxytag: member="xmlpp::DomParser::~DomParser" ref="3a18958b3980fb3ff44441868da7cb6a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual xmlpp::DomParser::~DomParser </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="437c91bb64033669649d91f28ecc7dc9"></a><!-- doxytag: member="xmlpp::DomParser::parse_file" ref="437c91bb64033669649d91f28ecc7dc9" args="(const Glib::ustring &filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void xmlpp::DomParser::parse_file </td> <td>(</td> <td class="paramtype">const <a class="elRef" doxygen="glibmm_doxygen_tags:http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/" href="http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"> <em>filename</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Parse an XML document from a file. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxmlpp_1_1exception.html" title="Base class for all xmlpp exceptions.">exception</a></em> </td><td></td></tr> </table> </dl> <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>The path to the file. </td></tr> </table> </dl> <p>Implements <a class="el" href="classxmlpp_1_1Parser.html#d0855eff9a35a9160800ad58ad19fd7e">xmlpp::Parser</a>.</p> </div> </div><p> <a class="anchor" name="2110398d5a19320e7bbe65e0edb2ab9c"></a><!-- doxytag: member="xmlpp::DomParser::parse_memory" ref="2110398d5a19320e7bbe65e0edb2ab9c" args="(const Glib::ustring &contents)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void xmlpp::DomParser::parse_memory </td> <td>(</td> <td class="paramtype">const <a class="elRef" doxygen="glibmm_doxygen_tags:http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/" href="http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"> <em>contents</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Parse an XML document from a string. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxmlpp_1_1exception.html" title="Base class for all xmlpp exceptions.">exception</a></em> </td><td></td></tr> </table> </dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>contents</em> </td><td>The XML document as a string. </td></tr> </table> </dl> <p>Implements <a class="el" href="classxmlpp_1_1Parser.html#bbbf646035570f1aa5366558dfc2ae01">xmlpp::Parser</a>.</p> </div> </div><p> <a class="anchor" name="ae7bd491f8aae685900bec03ec43d855"></a><!-- doxytag: member="xmlpp::DomParser::parse_memory_raw" ref="ae7bd491f8aae685900bec03ec43d855" args="(const unsigned char *contents, size_type bytes_count)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void xmlpp::DomParser::parse_memory_raw </td> <td>(</td> <td class="paramtype">const unsigned char * </td> <td class="paramname"> <em>contents</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classxmlpp_1_1Parser.html#8e7c797006bb5398629cf98f4141e3e6">size_type</a> </td> <td class="paramname"> <em>bytes_count</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Parse an XML document from raw memory. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxmlpp_1_1exception.html" title="Base class for all xmlpp exceptions.">exception</a></em> </td><td></td></tr> </table> </dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>contents</em> </td><td>The XML document as an array of bytes. </td></tr> <tr><td valign="top"></td><td valign="top"><em>bytes_count</em> </td><td>The number of bytes in the <em>contents</em> array. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="3d02d6c5b4194b47118e92a8e258743c"></a><!-- doxytag: member="xmlpp::DomParser::parse_stream" ref="3d02d6c5b4194b47118e92a8e258743c" args="(std::istream &in)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void xmlpp::DomParser::parse_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__istream.html">std::istream</a> & </td> <td class="paramname"> <em>in</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Parse an XML document from a stream. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classxmlpp_1_1exception.html" title="Base class for all xmlpp exceptions.">exception</a></em> </td><td></td></tr> </table> </dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>The stream. </td></tr> </table> </dl> <p>Implements <a class="el" href="classxmlpp_1_1Parser.html#d7134b1c68308351785acb0302aa54db">xmlpp::Parser</a>.</p> </div> </div><p> <a class="anchor" name="f6455076d91fc65e39f82e9a6c7ad764"></a><!-- doxytag: member="xmlpp::DomParser::operator bool" ref="f6455076d91fc65e39f82e9a6c7ad764" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">xmlpp::DomParser::operator <a class="el" href="classbool.html">bool</a> </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Test whether a document has been parsed. <p> </div> </div><p> <a class="anchor" name="d10907d495f9e1e2b63638a9c69f78a8"></a><!-- doxytag: member="xmlpp::DomParser::get_document" ref="d10907d495f9e1e2b63638a9c69f78a8" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Document.html">Document</a>* xmlpp::DomParser::get_document </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="4a3452e46cf656998d8752ed949239de"></a><!-- doxytag: member="xmlpp::DomParser::get_document" ref="4a3452e46cf656998d8752ed949239de" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classxmlpp_1_1Document.html">Document</a>* xmlpp::DomParser::get_document </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="0f77c8ab0a9ab2d7abd809846ae75d6f"></a><!-- doxytag: member="xmlpp::DomParser::parse_context" ref="0f77c8ab0a9ab2d7abd809846ae75d6f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void xmlpp::DomParser::parse_context </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="58a312db2834a41a77ca290dc6dc48fe"></a><!-- doxytag: member="xmlpp::DomParser::release_underlying" ref="58a312db2834a41a77ca290dc6dc48fe" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void xmlpp::DomParser::release_underlying </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Reimplemented from <a class="el" href="classxmlpp_1_1Parser.html#346ebfb1219e1c0d3acbd017a07706e6">xmlpp::Parser</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="b95c1209f2311df8fe1f1f34651d2d28"></a><!-- doxytag: member="xmlpp::DomParser::doc_" ref="b95c1209f2311df8fe1f1f34651d2d28" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classxmlpp_1_1Document.html">Document</a>* <a class="el" href="classxmlpp_1_1DomParser.html#b95c1209f2311df8fe1f1f34651d2d28">xmlpp::DomParser::doc_</a><code> [protected]</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="domparser_8h.html">domparser.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jul 1 11:39:59 2008 for libxml++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> </body> </html>