1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>libxml++: xmlpp::SaxParser Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.4.0 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
9
<a class="el" href="namespacexmlpp.html">xmlpp</a>::<a class="el" href="classxmlpp_1_1SaxParser.html">SaxParser</a></div>
10
<h1>xmlpp::SaxParser Class Reference</h1>SAX XML parser.
11
<a href="#_details">More...</a>
13
Inheritance diagram for xmlpp::SaxParser:<p><center><img src="classxmlpp_1_1SaxParser__inherit__graph.jpg" border="0" usemap="#xmlpp_1_1SaxParser__inherit__map" alt="Inheritance graph"></center>
14
<map name="xmlpp_1_1SaxParser__inherit__map">
15
<area href="classxmlpp_1_1Parser.html" shape="rect" coords="27,86,123,105" alt="">
16
<area href="classxmlpp_1_1NonCopyable.html" shape="rect" coords="7,17,143,36" alt="">
18
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classxmlpp_1_1SaxParser-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
20
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
21
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <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_1deque.html">std::deque</a>< <a class="el" href="structxmlpp_1_1SaxParser_1_1Attribute.html">Attribute</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#w0">AttributeList</a></td></tr>
23
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
24
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a0">SaxParser</a> (<a class="el" href="classbool.html">bool</a> use_get_entity=false)</td></tr>
26
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a1">~SaxParser</a> ()</td></tr>
28
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a2">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>
30
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a file. <a href="#a2"></a><br></td></tr>
31
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a3">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>
33
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a string. <a href="#a3"></a><br></td></tr>
34
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a4">parse_memory_raw</a> (const unsigned char *contents, <a class="el" href="classxmlpp_1_1Parser.html#w0">size_type</a> bytes_count)</td></tr>
36
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from raw memory. <a href="#a4"></a><br></td></tr>
37
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a5">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>
39
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a stream. <a href="#a5"></a><br></td></tr>
40
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a6">parse_chunk</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> &chunk)</td></tr>
42
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse a chunk of data. <a href="#a6"></a><br></td></tr>
43
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#a7">finish_chunk_parsing</a> ()</td></tr>
45
<tr><td class="mdescLeft"> </td><td class="mdescRight">Finish a chunk-wise parse. <a href="#a7"></a><br></td></tr>
46
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
47
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b0">on_start_document</a> ()</td></tr>
49
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b1">on_end_document</a> ()</td></tr>
51
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b2">on_start_element</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> &name, const <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_1deque.html">AttributeList</a> &attributes)</td></tr>
53
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b3">on_end_element</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> &name)</td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b4">on_characters</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> &characters)</td></tr>
57
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b5">on_comment</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> &text)</td></tr>
59
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b6">on_warning</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> &text)</td></tr>
61
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b7">on_error</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> &text)</td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b8">on_fatal_error</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> &text)</td></tr>
65
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b9">on_cdata_block</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> &text)</td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b10">on_internal_subset</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> &name, 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> &publicId, 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> &systemId)</td></tr>
69
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override this to receive information about the document's DTD and any entity declarations. <a href="#b10"></a><br></td></tr>
70
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual _xmlEntity * </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b11">on_get_entity</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> &name)</td></tr>
72
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override this method to resolve entities references in your derived parser, instead of using the default entity resolution, or to be informed when entity references are encountered. <a href="#b11"></a><br></td></tr>
73
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b12">on_entity_declaration</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> &name, <a class="el" href="namespacexmlpp.html#a7">XmlEntityType</a> type, 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> &publicId, 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> &systemId, 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> &content)</td></tr>
75
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override this to receive information about every entity declaration. <a href="#b12"></a><br></td></tr>
76
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#b13">release_underlying</a> ()</td></tr>
78
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
79
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#n0">SaxParserCallback</a></td></tr>
81
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
82
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structxmlpp_1_1SaxParser_1_1Attribute.html">Attribute</a></td></tr>
84
<tr><td class="mdescLeft"> </td><td class="mdescRight">Simple structure used in the start_element callback, in which the attributes are a list of name/value pairs. <a href="structxmlpp_1_1SaxParser_1_1Attribute.html#_details">More...</a><br></td></tr>
85
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structxmlpp_1_1SaxParser_1_1AttributeHasName.html">AttributeHasName</a></td></tr>
87
<tr><td class="mdescLeft"> </td><td class="mdescRight">This functor is a helper to find an attribute by name in an AttributeList using the standard algorithm <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#a237">std::find_if</a>. <a href="structxmlpp_1_1SaxParser_1_1AttributeHasName.html#_details">More...</a><br></td></tr>
89
<hr><a name="_details"></a><h2>Detailed Description</h2>
92
Derive your own class and override the on_*() methods.
94
<hr><h2>Member Typedef Documentation</h2>
95
<a class="anchor" name="w0" doxytag="xmlpp::SaxParser::AttributeList"></a><p>
96
<table class="mdTable" cellpadding="2" cellspacing="0">
99
<table cellpadding="0" cellspacing="0" border="0">
101
<td class="md" nowrap valign="top">typedef <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_1deque.html">std::deque</a>< <a class="el" href="structxmlpp_1_1SaxParser_1_1Attribute.html">Attribute</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_1deque.html">xmlpp::SaxParser::AttributeList</a> </td>
107
<table cellspacing="5" cellpadding="0" border="0">
118
<hr><h2>Constructor & Destructor Documentation</h2>
119
<a class="anchor" name="a0" doxytag="xmlpp::SaxParser::SaxParser"></a><p>
120
<table class="mdTable" cellpadding="2" cellspacing="0">
123
<table cellpadding="0" cellspacing="0" border="0">
125
<td class="md" nowrap valign="top">xmlpp::SaxParser::SaxParser </td>
126
<td class="md" valign="top">( </td>
127
<td class="md" nowrap valign="top"><a class="el" href="classbool.html">bool</a> </td>
128
<td class="mdname1" valign="top" nowrap> <em>use_get_entity</em> = <code>false</code> </td>
129
<td class="md" valign="top"> ) </td>
130
<td class="md" nowrap></td>
136
<table cellspacing="5" cellpadding="0" border="0">
144
<dl compact><dt><b>Parameters:</b></dt><dd>
145
<table border="0" cellspacing="2" cellpadding="0">
146
<tr><td valign="top"></td><td valign="top"><em>use_get_entity</em> </td><td>Set this to true if you will override <a class="el" href="classxmlpp_1_1SaxParser.html#b11">on_get_entity()</a>. In theory, if you do not override <a class="el" href="classxmlpp_1_1SaxParser.html#b11">on_get_entity()</a> the parser should behave exactly the same whether you use true or false here. But the default implementation of <a class="el" href="classxmlpp_1_1SaxParser.html#b11">on_get_entity()</a>, needed if you override <a class="el" href="classxmlpp_1_1SaxParser.html#b11">on_get_entity()</a> might not have the same behaviour as the underlying default behaviour of libxml, so the libxml implementation is the default here. </td></tr>
152
<a class="anchor" name="a1" doxytag="xmlpp::SaxParser::~SaxParser"></a><p>
153
<table class="mdTable" cellpadding="2" cellspacing="0">
156
<table cellpadding="0" cellspacing="0" border="0">
158
<td class="md" nowrap valign="top">virtual xmlpp::SaxParser::~<a class="el" href="classxmlpp_1_1SaxParser.html">SaxParser</a> </td>
159
<td class="md" valign="top">( </td>
160
<td class="mdname1" valign="top" nowrap> </td>
161
<td class="md" valign="top"> ) </td>
162
<td class="md" nowrap><code> [virtual]</code></td>
168
<table cellspacing="5" cellpadding="0" border="0">
179
<hr><h2>Member Function Documentation</h2>
180
<a class="anchor" name="a7" doxytag="xmlpp::SaxParser::finish_chunk_parsing"></a><p>
181
<table class="mdTable" cellpadding="2" cellspacing="0">
184
<table cellpadding="0" cellspacing="0" border="0">
186
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::finish_chunk_parsing </td>
187
<td class="md" valign="top">( </td>
188
<td class="mdname1" valign="top" nowrap> </td>
189
<td class="md" valign="top"> ) </td>
190
<td class="md" nowrap><code> [virtual]</code></td>
196
<table cellspacing="5" cellpadding="0" border="0">
204
Finish a chunk-wise parse.
206
Call this after the last call to <a class="el" href="classxmlpp_1_1SaxParser.html#a6">parse_chunk()</a>. Don't use this function with the other parsing methods. </td>
209
<a class="anchor" name="b9" doxytag="xmlpp::SaxParser::on_cdata_block"></a><p>
210
<table class="mdTable" cellpadding="2" cellspacing="0">
213
<table cellpadding="0" cellspacing="0" border="0">
215
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_cdata_block </td>
216
<td class="md" valign="top">( </td>
217
<td class="md" nowrap valign="top">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>
218
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
219
<td class="md" valign="top"> ) </td>
220
<td class="md" nowrap><code> [protected, virtual]</code></td>
226
<table cellspacing="5" cellpadding="0" border="0">
237
<a class="anchor" name="b4" doxytag="xmlpp::SaxParser::on_characters"></a><p>
238
<table class="mdTable" cellpadding="2" cellspacing="0">
241
<table cellpadding="0" cellspacing="0" border="0">
243
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_characters </td>
244
<td class="md" valign="top">( </td>
245
<td class="md" nowrap valign="top">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>
246
<td class="mdname1" valign="top" nowrap> <em>characters</em> </td>
247
<td class="md" valign="top"> ) </td>
248
<td class="md" nowrap><code> [protected, virtual]</code></td>
254
<table cellspacing="5" cellpadding="0" border="0">
265
<a class="anchor" name="b5" doxytag="xmlpp::SaxParser::on_comment"></a><p>
266
<table class="mdTable" cellpadding="2" cellspacing="0">
269
<table cellpadding="0" cellspacing="0" border="0">
271
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_comment </td>
272
<td class="md" valign="top">( </td>
273
<td class="md" nowrap valign="top">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>
274
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
275
<td class="md" valign="top"> ) </td>
276
<td class="md" nowrap><code> [protected, virtual]</code></td>
282
<table cellspacing="5" cellpadding="0" border="0">
293
<a class="anchor" name="b1" doxytag="xmlpp::SaxParser::on_end_document"></a><p>
294
<table class="mdTable" cellpadding="2" cellspacing="0">
297
<table cellpadding="0" cellspacing="0" border="0">
299
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_end_document </td>
300
<td class="md" valign="top">( </td>
301
<td class="mdname1" valign="top" nowrap> </td>
302
<td class="md" valign="top"> ) </td>
303
<td class="md" nowrap><code> [protected, virtual]</code></td>
309
<table cellspacing="5" cellpadding="0" border="0">
320
<a class="anchor" name="b3" doxytag="xmlpp::SaxParser::on_end_element"></a><p>
321
<table class="mdTable" cellpadding="2" cellspacing="0">
324
<table cellpadding="0" cellspacing="0" border="0">
326
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_end_element </td>
327
<td class="md" valign="top">( </td>
328
<td class="md" nowrap valign="top">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>
329
<td class="mdname1" valign="top" nowrap> <em>name</em> </td>
330
<td class="md" valign="top"> ) </td>
331
<td class="md" nowrap><code> [protected, virtual]</code></td>
337
<table cellspacing="5" cellpadding="0" border="0">
348
<a class="anchor" name="b12" doxytag="xmlpp::SaxParser::on_entity_declaration"></a><p>
349
<table class="mdTable" cellpadding="2" cellspacing="0">
352
<table cellpadding="0" cellspacing="0" border="0">
354
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_entity_declaration </td>
355
<td class="md" valign="top">( </td>
356
<td class="md" nowrap valign="top">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>
357
<td class="mdname" nowrap> <em>name</em>, </td>
360
<td class="md" nowrap align="right"></td>
362
<td class="md" nowrap><a class="el" href="namespacexmlpp.html#a7">XmlEntityType</a> </td>
363
<td class="mdname" nowrap> <em>type</em>, </td>
366
<td class="md" nowrap align="right"></td>
368
<td class="md" nowrap>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>
369
<td class="mdname" nowrap> <em>publicId</em>, </td>
372
<td class="md" nowrap align="right"></td>
374
<td class="md" nowrap>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>
375
<td class="mdname" nowrap> <em>systemId</em>, </td>
378
<td class="md" nowrap align="right"></td>
380
<td class="md" nowrap>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>
381
<td class="mdname" nowrap> <em>content</em></td>
385
<td class="md">) </td>
386
<td class="md" colspan="2"><code> [protected, virtual]</code></td>
392
<table cellspacing="5" cellpadding="0" border="0">
400
Override this to receive information about every entity declaration.
402
If you override this function, and you want normal entity substitution to work, then you must call the base class in your override.<p>
403
This would be useful when overriding <a class="el" href="classxmlpp_1_1SaxParser.html#b11">on_get_entity()</a>. </td>
406
<a class="anchor" name="b7" doxytag="xmlpp::SaxParser::on_error"></a><p>
407
<table class="mdTable" cellpadding="2" cellspacing="0">
410
<table cellpadding="0" cellspacing="0" border="0">
412
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_error </td>
413
<td class="md" valign="top">( </td>
414
<td class="md" nowrap valign="top">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>
415
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
416
<td class="md" valign="top"> ) </td>
417
<td class="md" nowrap><code> [protected, virtual]</code></td>
423
<table cellspacing="5" cellpadding="0" border="0">
434
<a class="anchor" name="b8" doxytag="xmlpp::SaxParser::on_fatal_error"></a><p>
435
<table class="mdTable" cellpadding="2" cellspacing="0">
438
<table cellpadding="0" cellspacing="0" border="0">
440
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_fatal_error </td>
441
<td class="md" valign="top">( </td>
442
<td class="md" nowrap valign="top">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>
443
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
444
<td class="md" valign="top"> ) </td>
445
<td class="md" nowrap><code> [protected, virtual]</code></td>
451
<table cellspacing="5" cellpadding="0" border="0">
462
<a class="anchor" name="b11" doxytag="xmlpp::SaxParser::on_get_entity"></a><p>
463
<table class="mdTable" cellpadding="2" cellspacing="0">
466
<table cellpadding="0" cellspacing="0" border="0">
468
<td class="md" nowrap valign="top">virtual _xmlEntity* xmlpp::SaxParser::on_get_entity </td>
469
<td class="md" valign="top">( </td>
470
<td class="md" nowrap valign="top">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>
471
<td class="mdname1" valign="top" nowrap> <em>name</em> </td>
472
<td class="md" valign="top"> ) </td>
473
<td class="md" nowrap><code> [protected, virtual]</code></td>
479
<table cellspacing="5" cellpadding="0" border="0">
487
Override this method to resolve entities references in your derived parser, instead of using the default entity resolution, or to be informed when entity references are encountered.
489
If you override this function then you must also specify true for use_get_entity constructor parameter. You will probably need to override <a class="el" href="classxmlpp_1_1SaxParser.html#b12">on_entity_declaration()</a> as well so that you can use that information when resolving the entity reference.<p>
490
This is known to be difficult, because it requires both an understanding of the W3C specifications and knowledge of the libxml internals. Entity resolution is easier with the <a class="el" href="classxmlpp_1_1DomParser.html">DomParser</a>.<p>
491
Call this method in this base class for default processing. For instance, if you just want to know about the existence of an entity reference, without affecting the normal substitution, just override and call the base class.<p>
492
Unlike the <a class="el" href="classxmlpp_1_1DomParser.html">DomParser</a>, the <a class="el" href="classxmlpp_1_1SaxParser.html">SaxParser</a> will also tell you about entity references for the 5 predefined entities.<p>
493
<dl compact><dt><b>Parameters:</b></dt><dd>
494
<table border="0" cellspacing="2" cellpadding="0">
495
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The entity reference name. </td></tr>
498
<dl compact><dt><b>Returns:</b></dt><dd>The resolved xmlEntity for the entity reference. You must include libxml/parser.h in order to use this C struct. This instance will not be freed by the caller. </dd></dl>
502
<a class="anchor" name="b10" doxytag="xmlpp::SaxParser::on_internal_subset"></a><p>
503
<table class="mdTable" cellpadding="2" cellspacing="0">
506
<table cellpadding="0" cellspacing="0" border="0">
508
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_internal_subset </td>
509
<td class="md" valign="top">( </td>
510
<td class="md" nowrap valign="top">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>
511
<td class="mdname" nowrap> <em>name</em>, </td>
514
<td class="md" nowrap align="right"></td>
516
<td class="md" nowrap>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>
517
<td class="mdname" nowrap> <em>publicId</em>, </td>
520
<td class="md" nowrap align="right"></td>
522
<td class="md" nowrap>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>
523
<td class="mdname" nowrap> <em>systemId</em></td>
527
<td class="md">) </td>
528
<td class="md" colspan="2"><code> [protected, virtual]</code></td>
534
<table cellspacing="5" cellpadding="0" border="0">
542
Override this to receive information about the document's DTD and any entity declarations.
547
<a class="anchor" name="b0" doxytag="xmlpp::SaxParser::on_start_document"></a><p>
548
<table class="mdTable" cellpadding="2" cellspacing="0">
551
<table cellpadding="0" cellspacing="0" border="0">
553
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_start_document </td>
554
<td class="md" valign="top">( </td>
555
<td class="mdname1" valign="top" nowrap> </td>
556
<td class="md" valign="top"> ) </td>
557
<td class="md" nowrap><code> [protected, virtual]</code></td>
563
<table cellspacing="5" cellpadding="0" border="0">
574
<a class="anchor" name="b2" doxytag="xmlpp::SaxParser::on_start_element"></a><p>
575
<table class="mdTable" cellpadding="2" cellspacing="0">
578
<table cellpadding="0" cellspacing="0" border="0">
580
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_start_element </td>
581
<td class="md" valign="top">( </td>
582
<td class="md" nowrap valign="top">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>
583
<td class="mdname" nowrap> <em>name</em>, </td>
586
<td class="md" nowrap align="right"></td>
588
<td class="md" nowrap>const <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_1deque.html">AttributeList</a> & </td>
589
<td class="mdname" nowrap> <em>attributes</em></td>
593
<td class="md">) </td>
594
<td class="md" colspan="2"><code> [protected, virtual]</code></td>
600
<table cellspacing="5" cellpadding="0" border="0">
611
<a class="anchor" name="b6" doxytag="xmlpp::SaxParser::on_warning"></a><p>
612
<table class="mdTable" cellpadding="2" cellspacing="0">
615
<table cellpadding="0" cellspacing="0" border="0">
617
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::on_warning </td>
618
<td class="md" valign="top">( </td>
619
<td class="md" nowrap valign="top">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>
620
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
621
<td class="md" valign="top"> ) </td>
622
<td class="md" nowrap><code> [protected, virtual]</code></td>
628
<table cellspacing="5" cellpadding="0" border="0">
639
<a class="anchor" name="a6" doxytag="xmlpp::SaxParser::parse_chunk"></a><p>
640
<table class="mdTable" cellpadding="2" cellspacing="0">
643
<table cellpadding="0" cellspacing="0" border="0">
645
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::parse_chunk </td>
646
<td class="md" valign="top">( </td>
647
<td class="md" nowrap valign="top">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>
648
<td class="mdname1" valign="top" nowrap> <em>chunk</em> </td>
649
<td class="md" valign="top"> ) </td>
650
<td class="md" nowrap><code> [virtual]</code></td>
656
<table cellspacing="5" cellpadding="0" border="0">
664
Parse a chunk of data.
666
This lets you pass a document in small chunks, e.g. from a network connection. The on_* virtual functions are called each time the chunks provide enough information to advance the parser.<p>
667
The first call to parse_chunk will setup the parser. When the last chunk has been parsed, call <a class="el" href="classxmlpp_1_1SaxParser.html#a7">finish_chunk_parsing()</a> to finish the parse.<p>
668
<dl compact><dt><b>Exceptions:</b></dt><dd>
669
<table border="0" cellspacing="2" cellpadding="0">
670
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
673
<dl compact><dt><b>Parameters:</b></dt><dd>
674
<table border="0" cellspacing="2" cellpadding="0">
675
<tr><td valign="top"></td><td valign="top"><em>chunk</em> </td><td>The next piece of the XML document. </td></tr>
681
<a class="anchor" name="a2" doxytag="xmlpp::SaxParser::parse_file"></a><p>
682
<table class="mdTable" cellpadding="2" cellspacing="0">
685
<table cellpadding="0" cellspacing="0" border="0">
687
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::parse_file </td>
688
<td class="md" valign="top">( </td>
689
<td class="md" nowrap valign="top">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>
690
<td class="mdname1" valign="top" nowrap> <em>filename</em> </td>
691
<td class="md" valign="top"> ) </td>
692
<td class="md" nowrap><code> [virtual]</code></td>
698
<table cellspacing="5" cellpadding="0" border="0">
706
Parse an XML document from a file.
708
<dl compact><dt><b>Exceptions:</b></dt><dd>
709
<table border="0" cellspacing="2" cellpadding="0">
710
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
713
<dl compact><dt><b>Parameters:</b></dt><dd>
714
<table border="0" cellspacing="2" cellpadding="0">
715
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The path to the file. </td></tr>
720
Implements <a class="el" href="classxmlpp_1_1Parser.html#a6">xmlpp::Parser</a>. </td>
723
<a class="anchor" name="a3" doxytag="xmlpp::SaxParser::parse_memory"></a><p>
724
<table class="mdTable" cellpadding="2" cellspacing="0">
727
<table cellpadding="0" cellspacing="0" border="0">
729
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::parse_memory </td>
730
<td class="md" valign="top">( </td>
731
<td class="md" nowrap valign="top">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>
732
<td class="mdname1" valign="top" nowrap> <em>contents</em> </td>
733
<td class="md" valign="top"> ) </td>
734
<td class="md" nowrap><code> [virtual]</code></td>
740
<table cellspacing="5" cellpadding="0" border="0">
748
Parse an XML document from a string.
750
<dl compact><dt><b>Exceptions:</b></dt><dd>
751
<table border="0" cellspacing="2" cellpadding="0">
752
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
755
<dl compact><dt><b>Parameters:</b></dt><dd>
756
<table border="0" cellspacing="2" cellpadding="0">
757
<tr><td valign="top"></td><td valign="top"><em>contents</em> </td><td>The XML document as a string. </td></tr>
762
Implements <a class="el" href="classxmlpp_1_1Parser.html#a7">xmlpp::Parser</a>. </td>
765
<a class="anchor" name="a4" doxytag="xmlpp::SaxParser::parse_memory_raw"></a><p>
766
<table class="mdTable" cellpadding="2" cellspacing="0">
769
<table cellpadding="0" cellspacing="0" border="0">
771
<td class="md" nowrap valign="top">void xmlpp::SaxParser::parse_memory_raw </td>
772
<td class="md" valign="top">( </td>
773
<td class="md" nowrap valign="top">const unsigned char * </td>
774
<td class="mdname" nowrap> <em>contents</em>, </td>
777
<td class="md" nowrap align="right"></td>
779
<td class="md" nowrap><a class="el" href="classxmlpp_1_1Parser.html#w0">size_type</a> </td>
780
<td class="mdname" nowrap> <em>bytes_count</em></td>
784
<td class="md">) </td>
785
<td class="md" colspan="2"></td>
791
<table cellspacing="5" cellpadding="0" border="0">
799
Parse an XML document from raw memory.
801
<dl compact><dt><b>Exceptions:</b></dt><dd>
802
<table border="0" cellspacing="2" cellpadding="0">
803
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
806
<dl compact><dt><b>Parameters:</b></dt><dd>
807
<table border="0" cellspacing="2" cellpadding="0">
808
<tr><td valign="top"></td><td valign="top"><em>contents</em> </td><td>The XML document as an array of bytes. </td></tr>
809
<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>
815
<a class="anchor" name="a5" doxytag="xmlpp::SaxParser::parse_stream"></a><p>
816
<table class="mdTable" cellpadding="2" cellspacing="0">
819
<table cellpadding="0" cellspacing="0" border="0">
821
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::parse_stream </td>
822
<td class="md" valign="top">( </td>
823
<td class="md" nowrap valign="top"><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>
824
<td class="mdname1" valign="top" nowrap> <em>in</em> </td>
825
<td class="md" valign="top"> ) </td>
826
<td class="md" nowrap><code> [virtual]</code></td>
832
<table cellspacing="5" cellpadding="0" border="0">
840
Parse an XML document from a stream.
842
<dl compact><dt><b>Exceptions:</b></dt><dd>
843
<table border="0" cellspacing="2" cellpadding="0">
844
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
847
<dl compact><dt><b>Parameters:</b></dt><dd>
848
<table border="0" cellspacing="2" cellpadding="0">
849
<tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>The stream. </td></tr>
854
Implements <a class="el" href="classxmlpp_1_1Parser.html#a8">xmlpp::Parser</a>. </td>
857
<a class="anchor" name="b13" doxytag="xmlpp::SaxParser::release_underlying"></a><p>
858
<table class="mdTable" cellpadding="2" cellspacing="0">
861
<table cellpadding="0" cellspacing="0" border="0">
863
<td class="md" nowrap valign="top">virtual void xmlpp::SaxParser::release_underlying </td>
864
<td class="md" valign="top">( </td>
865
<td class="mdname1" valign="top" nowrap> </td>
866
<td class="md" valign="top"> ) </td>
867
<td class="md" nowrap><code> [protected, virtual]</code></td>
873
<table cellspacing="5" cellpadding="0" border="0">
883
Reimplemented from <a class="el" href="classxmlpp_1_1Parser.html#b1">xmlpp::Parser</a>. </td>
886
<hr><h2>Friends And Related Function Documentation</h2>
887
<a class="anchor" name="n0" doxytag="xmlpp::SaxParser::SaxParserCallback"></a><p>
888
<table class="mdTable" cellpadding="2" cellspacing="0">
891
<table cellpadding="0" cellspacing="0" border="0">
893
<td class="md" nowrap valign="top">friend struct SaxParserCallback<code> [friend]</code> </td>
899
<table cellspacing="5" cellpadding="0" border="0">
910
<hr>The documentation for this class was generated from the following file:<ul>
911
<li><a class="el" href="saxparser_8h.html">saxparser.h</a></ul>
912
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 8 12:05:38 2005 for libxml++ by
913
<a href="http://www.doxygen.org/index.html">
914
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.0 </small></address>