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">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.1 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
12
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
13
<li><a href="files.html"><span>Files</span></a></li>
14
<li><a href="dirs.html"><span>Directories</span></a></li>
15
<li><a href="pages.html"><span>Related Pages</span></a></li>
19
<li><a href="classes.html"><span>Alphabetical List</span></a></li>
20
<li><a href="annotated.html"><span>Class List</span></a></li>
21
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
22
<li><a href="functions.html"><span>Class Members</span></a></li>
25
<a class="el" href="namespacexmlpp.html">xmlpp</a>::<a class="el" href="classxmlpp_1_1SaxParser.html">SaxParser</a></div>
26
<h1>xmlpp::SaxParser Class Reference</h1><!-- doxytag: class="xmlpp::SaxParser" --><!-- doxytag: inherits="xmlpp::Parser" -->SAX XML parser.
27
<a href="#_details">More...</a>
29
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>
30
<map name="xmlpp_1_1SaxParser__inherit__map">
31
<area href="classxmlpp_1_1Parser.html" shape="rect" coords="28,84,140,111" alt="">
32
<area href="classxmlpp_1_1NonCopyable.html" shape="rect" coords="5,7,163,33" alt="">
34
<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">
36
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
37
<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#1cb4e32dd3adf2460f2836bddb59633c">AttributeList</a></td></tr>
39
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
40
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#66bfaafc79c00197010f8d22b2a39df8">SaxParser</a> (<a class="el" href="classbool.html">bool</a> use_get_entity=false)</td></tr>
42
<tr><td class="mdescLeft"> </td><td class="mdescRight"><dl compact><dt><b>Parameters:</b></dt><dd>
43
<table border="0" cellspacing="2" cellpadding="0">
44
<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#eb20c4424f325655ebd787c2b2268137">on_get_entity()</a>. </td></tr>
47
<a href="#66bfaafc79c00197010f8d22b2a39df8"></a><br></td></tr>
48
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#3f69d5fe3472240225dd46f8c70a4e79">~SaxParser</a> ()</td></tr>
50
<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#c2b0cf0069a73fa92c80f6d455923698">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>
52
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a file. <a href="#c2b0cf0069a73fa92c80f6d455923698"></a><br></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#b9367c59f02e0db5a2b17cd48ddf74f9">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>
55
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a string. <a href="#b9367c59f02e0db5a2b17cd48ddf74f9"></a><br></td></tr>
56
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#ff9643a2764f6d8caee0307abbfcca25">parse_memory_raw</a> (const unsigned char *contents, <a class="el" href="classxmlpp_1_1Parser.html#8e7c797006bb5398629cf98f4141e3e6">size_type</a> bytes_count)</td></tr>
58
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from raw memory. <a href="#ff9643a2764f6d8caee0307abbfcca25"></a><br></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#aa731e56f99aa7f8313a1f096389f723">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>
61
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse an XML document from a stream. <a href="#aa731e56f99aa7f8313a1f096389f723"></a><br></td></tr>
62
<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#24b4440b0539a0015890182b35396b5d">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>
64
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse a chunk of data. <a href="#24b4440b0539a0015890182b35396b5d"></a><br></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#c540859149b064cfce87931ba736f3c5">finish_chunk_parsing</a> ()</td></tr>
67
<tr><td class="mdescLeft"> </td><td class="mdescRight">Finish a chunk-wise parse. <a href="#c540859149b064cfce87931ba736f3c5"></a><br></td></tr>
68
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
69
<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#0a33932c84e245284414003f668b829f">on_start_document</a> ()</td></tr>
71
<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#a7b3090025892829af91f8c51a06ef7b">on_end_document</a> ()</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#1496022dd6b58d9af6a4a7a703830a84">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>
75
<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#5c1c00b47c020e3cd8d623361c6909fa">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>
77
<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#359b48ea1c15cb39837f680a1f2fb2c2">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>
79
<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#cccf558fc47549bdad076201193739f3">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>
81
<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#b951160501bf3e78901691a79e3d11e8">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>
83
<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#38c3c5f9bad26030acee20d7ddf4936a">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>
85
<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#d951cc2b1fe314805c5d735a0d7f467c">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>
87
<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#f6671ab7dbda78730a65dcbb58aa0ec1">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>
89
<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#4b453817ac37ea307c2ba023cc938794">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>
91
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override this to receive information about the document's DTD and any entity declarations. <a href="#4b453817ac37ea307c2ba023cc938794"></a><br></td></tr>
92
<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#eb20c4424f325655ebd787c2b2268137">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>
94
<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="#eb20c4424f325655ebd787c2b2268137"></a><br></td></tr>
95
<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#b0985199cbdbd9a7ab31b024acf3c2c8">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#0fa47f0fb103cf9ea460a2fef3f5be49">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>
97
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override this to receive information about every entity declaration. <a href="#b0985199cbdbd9a7ab31b024acf3c2c8"></a><br></td></tr>
98
<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#839554028d8bad81774040eb67d23103">release_underlying</a> ()</td></tr>
100
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
101
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="classxmlpp_1_1SaxParser.html#f6957a9354f608a7784028e9e94aba14">SaxParserCallback</a></td></tr>
103
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
104
<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>
106
<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>
107
<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>
109
<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>
111
<hr><a name="_details"></a><h2>Detailed Description</h2>
114
Derive your own class and override the on_*() methods.
116
<hr><h2>Member Typedef Documentation</h2>
117
<a class="anchor" name="1cb4e32dd3adf2460f2836bddb59633c"></a><!-- doxytag: member="xmlpp::SaxParser::AttributeList" ref="1cb4e32dd3adf2460f2836bddb59633c" args="" -->
118
<div class="memitem">
119
<div class="memproto">
120
<table class="memname">
122
<td class="memname">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>
132
<hr><h2>Constructor & Destructor Documentation</h2>
133
<a class="anchor" name="66bfaafc79c00197010f8d22b2a39df8"></a><!-- doxytag: member="xmlpp::SaxParser::SaxParser" ref="66bfaafc79c00197010f8d22b2a39df8" args="(bool use_get_entity=false)" -->
134
<div class="memitem">
135
<div class="memproto">
136
<table class="memname">
138
<td class="memname">xmlpp::SaxParser::SaxParser </td>
140
<td class="paramtype"><a class="el" href="classbool.html">bool</a> </td>
141
<td class="paramname"> <em>use_get_entity</em> = <code>false</code> </td>
142
<td> ) </td>
143
<td width="100%"></td>
150
<dl compact><dt><b>Parameters:</b></dt><dd>
151
<table border="0" cellspacing="2" cellpadding="0">
152
<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#eb20c4424f325655ebd787c2b2268137">on_get_entity()</a>. </td></tr>
157
In theory, if you do not override <a class="el" href="classxmlpp_1_1SaxParser.html#eb20c4424f325655ebd787c2b2268137">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#eb20c4424f325655ebd787c2b2268137">on_get_entity()</a>, needed if you override <a class="el" href="classxmlpp_1_1SaxParser.html#eb20c4424f325655ebd787c2b2268137">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.
160
<a class="anchor" name="3f69d5fe3472240225dd46f8c70a4e79"></a><!-- doxytag: member="xmlpp::SaxParser::~SaxParser" ref="3f69d5fe3472240225dd46f8c70a4e79" args="()" -->
161
<div class="memitem">
162
<div class="memproto">
163
<table class="memname">
165
<td class="memname">virtual xmlpp::SaxParser::~SaxParser </td>
167
<td class="paramname"> </td>
168
<td> ) </td>
169
<td width="100%"><code> [virtual]</code></td>
179
<hr><h2>Member Function Documentation</h2>
180
<a class="anchor" name="c2b0cf0069a73fa92c80f6d455923698"></a><!-- doxytag: member="xmlpp::SaxParser::parse_file" ref="c2b0cf0069a73fa92c80f6d455923698" args="(const Glib::ustring &filename)" -->
181
<div class="memitem">
182
<div class="memproto">
183
<table class="memname">
185
<td class="memname">virtual void xmlpp::SaxParser::parse_file </td>
187
<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>
188
<td class="paramname"> <em>filename</em> </td>
189
<td> ) </td>
190
<td width="100%"><code> [virtual]</code></td>
197
Parse an XML document from a file.
199
<dl compact><dt><b>Exceptions:</b></dt><dd>
200
<table border="0" cellspacing="2" cellpadding="0">
201
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
204
<dl compact><dt><b>Parameters:</b></dt><dd>
205
<table border="0" cellspacing="2" cellpadding="0">
206
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The path to the file. </td></tr>
211
Implements <a class="el" href="classxmlpp_1_1Parser.html#d0855eff9a35a9160800ad58ad19fd7e">xmlpp::Parser</a>.
214
<a class="anchor" name="b9367c59f02e0db5a2b17cd48ddf74f9"></a><!-- doxytag: member="xmlpp::SaxParser::parse_memory" ref="b9367c59f02e0db5a2b17cd48ddf74f9" args="(const Glib::ustring &contents)" -->
215
<div class="memitem">
216
<div class="memproto">
217
<table class="memname">
219
<td class="memname">virtual void xmlpp::SaxParser::parse_memory </td>
221
<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>
222
<td class="paramname"> <em>contents</em> </td>
223
<td> ) </td>
224
<td width="100%"><code> [virtual]</code></td>
231
Parse an XML document from a string.
233
<dl compact><dt><b>Exceptions:</b></dt><dd>
234
<table border="0" cellspacing="2" cellpadding="0">
235
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
238
<dl compact><dt><b>Parameters:</b></dt><dd>
239
<table border="0" cellspacing="2" cellpadding="0">
240
<tr><td valign="top"></td><td valign="top"><em>contents</em> </td><td>The XML document as a string. </td></tr>
245
Implements <a class="el" href="classxmlpp_1_1Parser.html#bbbf646035570f1aa5366558dfc2ae01">xmlpp::Parser</a>.
248
<a class="anchor" name="ff9643a2764f6d8caee0307abbfcca25"></a><!-- doxytag: member="xmlpp::SaxParser::parse_memory_raw" ref="ff9643a2764f6d8caee0307abbfcca25" args="(const unsigned char *contents, size_type bytes_count)" -->
249
<div class="memitem">
250
<div class="memproto">
251
<table class="memname">
253
<td class="memname">void xmlpp::SaxParser::parse_memory_raw </td>
255
<td class="paramtype">const unsigned char * </td>
256
<td class="paramname"> <em>contents</em>, </td>
259
<td class="paramkey"></td>
261
<td class="paramtype"><a class="el" href="classxmlpp_1_1Parser.html#8e7c797006bb5398629cf98f4141e3e6">size_type</a> </td>
262
<td class="paramname"> <em>bytes_count</em></td><td> </td>
267
<td></td><td></td><td width="100%"></td>
274
Parse an XML document from raw memory.
276
<dl compact><dt><b>Exceptions:</b></dt><dd>
277
<table border="0" cellspacing="2" cellpadding="0">
278
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
281
<dl compact><dt><b>Parameters:</b></dt><dd>
282
<table border="0" cellspacing="2" cellpadding="0">
283
<tr><td valign="top"></td><td valign="top"><em>contents</em> </td><td>The XML document as an array of bytes. </td></tr>
284
<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>
290
<a class="anchor" name="aa731e56f99aa7f8313a1f096389f723"></a><!-- doxytag: member="xmlpp::SaxParser::parse_stream" ref="aa731e56f99aa7f8313a1f096389f723" args="(std::istream &in)" -->
291
<div class="memitem">
292
<div class="memproto">
293
<table class="memname">
295
<td class="memname">virtual void xmlpp::SaxParser::parse_stream </td>
297
<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>
298
<td class="paramname"> <em>in</em> </td>
299
<td> ) </td>
300
<td width="100%"><code> [virtual]</code></td>
307
Parse an XML document from a stream.
309
<dl compact><dt><b>Exceptions:</b></dt><dd>
310
<table border="0" cellspacing="2" cellpadding="0">
311
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
314
<dl compact><dt><b>Parameters:</b></dt><dd>
315
<table border="0" cellspacing="2" cellpadding="0">
316
<tr><td valign="top"></td><td valign="top"><em>in</em> </td><td>The stream. </td></tr>
321
Implements <a class="el" href="classxmlpp_1_1Parser.html#d7134b1c68308351785acb0302aa54db">xmlpp::Parser</a>.
324
<a class="anchor" name="24b4440b0539a0015890182b35396b5d"></a><!-- doxytag: member="xmlpp::SaxParser::parse_chunk" ref="24b4440b0539a0015890182b35396b5d" args="(const Glib::ustring &chunk)" -->
325
<div class="memitem">
326
<div class="memproto">
327
<table class="memname">
329
<td class="memname">virtual void xmlpp::SaxParser::parse_chunk </td>
331
<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>
332
<td class="paramname"> <em>chunk</em> </td>
333
<td> ) </td>
334
<td width="100%"><code> [virtual]</code></td>
341
Parse a chunk of data.
343
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>
344
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#c540859149b064cfce87931ba736f3c5">finish_chunk_parsing()</a> to finish the parse.<p>
345
<dl compact><dt><b>Exceptions:</b></dt><dd>
346
<table border="0" cellspacing="2" cellpadding="0">
347
<tr><td valign="top"></td><td valign="top"><em>exception</em> </td><td></td></tr>
350
<dl compact><dt><b>Parameters:</b></dt><dd>
351
<table border="0" cellspacing="2" cellpadding="0">
352
<tr><td valign="top"></td><td valign="top"><em>chunk</em> </td><td>The next piece of the XML document. </td></tr>
358
<a class="anchor" name="c540859149b064cfce87931ba736f3c5"></a><!-- doxytag: member="xmlpp::SaxParser::finish_chunk_parsing" ref="c540859149b064cfce87931ba736f3c5" args="()" -->
359
<div class="memitem">
360
<div class="memproto">
361
<table class="memname">
363
<td class="memname">virtual void xmlpp::SaxParser::finish_chunk_parsing </td>
365
<td class="paramname"> </td>
366
<td> ) </td>
367
<td width="100%"><code> [virtual]</code></td>
374
Finish a chunk-wise parse.
376
Call this after the last call to <a class="el" href="classxmlpp_1_1SaxParser.html#24b4440b0539a0015890182b35396b5d">parse_chunk()</a>. Don't use this function with the other parsing methods.
379
<a class="anchor" name="0a33932c84e245284414003f668b829f"></a><!-- doxytag: member="xmlpp::SaxParser::on_start_document" ref="0a33932c84e245284414003f668b829f" args="()" -->
380
<div class="memitem">
381
<div class="memproto">
382
<table class="memname">
384
<td class="memname">virtual void xmlpp::SaxParser::on_start_document </td>
386
<td class="paramname"> </td>
387
<td> ) </td>
388
<td width="100%"><code> [protected, virtual]</code></td>
398
<a class="anchor" name="a7b3090025892829af91f8c51a06ef7b"></a><!-- doxytag: member="xmlpp::SaxParser::on_end_document" ref="a7b3090025892829af91f8c51a06ef7b" args="()" -->
399
<div class="memitem">
400
<div class="memproto">
401
<table class="memname">
403
<td class="memname">virtual void xmlpp::SaxParser::on_end_document </td>
405
<td class="paramname"> </td>
406
<td> ) </td>
407
<td width="100%"><code> [protected, virtual]</code></td>
417
<a class="anchor" name="1496022dd6b58d9af6a4a7a703830a84"></a><!-- doxytag: member="xmlpp::SaxParser::on_start_element" ref="1496022dd6b58d9af6a4a7a703830a84" args="(const Glib::ustring &name, const AttributeList &attributes)" -->
418
<div class="memitem">
419
<div class="memproto">
420
<table class="memname">
422
<td class="memname">virtual void xmlpp::SaxParser::on_start_element </td>
424
<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>
425
<td class="paramname"> <em>name</em>, </td>
428
<td class="paramkey"></td>
430
<td class="paramtype">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>
431
<td class="paramname"> <em>attributes</em></td><td> </td>
436
<td></td><td></td><td width="100%"><code> [protected, virtual]</code></td>
446
<a class="anchor" name="5c1c00b47c020e3cd8d623361c6909fa"></a><!-- doxytag: member="xmlpp::SaxParser::on_end_element" ref="5c1c00b47c020e3cd8d623361c6909fa" args="(const Glib::ustring &name)" -->
447
<div class="memitem">
448
<div class="memproto">
449
<table class="memname">
451
<td class="memname">virtual void xmlpp::SaxParser::on_end_element </td>
453
<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>
454
<td class="paramname"> <em>name</em> </td>
455
<td> ) </td>
456
<td width="100%"><code> [protected, virtual]</code></td>
466
<a class="anchor" name="359b48ea1c15cb39837f680a1f2fb2c2"></a><!-- doxytag: member="xmlpp::SaxParser::on_characters" ref="359b48ea1c15cb39837f680a1f2fb2c2" args="(const Glib::ustring &characters)" -->
467
<div class="memitem">
468
<div class="memproto">
469
<table class="memname">
471
<td class="memname">virtual void xmlpp::SaxParser::on_characters </td>
473
<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>
474
<td class="paramname"> <em>characters</em> </td>
475
<td> ) </td>
476
<td width="100%"><code> [protected, virtual]</code></td>
486
<a class="anchor" name="cccf558fc47549bdad076201193739f3"></a><!-- doxytag: member="xmlpp::SaxParser::on_comment" ref="cccf558fc47549bdad076201193739f3" args="(const Glib::ustring &text)" -->
487
<div class="memitem">
488
<div class="memproto">
489
<table class="memname">
491
<td class="memname">virtual void xmlpp::SaxParser::on_comment </td>
493
<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>
494
<td class="paramname"> <em>text</em> </td>
495
<td> ) </td>
496
<td width="100%"><code> [protected, virtual]</code></td>
506
<a class="anchor" name="b951160501bf3e78901691a79e3d11e8"></a><!-- doxytag: member="xmlpp::SaxParser::on_warning" ref="b951160501bf3e78901691a79e3d11e8" args="(const Glib::ustring &text)" -->
507
<div class="memitem">
508
<div class="memproto">
509
<table class="memname">
511
<td class="memname">virtual void xmlpp::SaxParser::on_warning </td>
513
<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>
514
<td class="paramname"> <em>text</em> </td>
515
<td> ) </td>
516
<td width="100%"><code> [protected, virtual]</code></td>
526
<a class="anchor" name="38c3c5f9bad26030acee20d7ddf4936a"></a><!-- doxytag: member="xmlpp::SaxParser::on_error" ref="38c3c5f9bad26030acee20d7ddf4936a" args="(const Glib::ustring &text)" -->
527
<div class="memitem">
528
<div class="memproto">
529
<table class="memname">
531
<td class="memname">virtual void xmlpp::SaxParser::on_error </td>
533
<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>
534
<td class="paramname"> <em>text</em> </td>
535
<td> ) </td>
536
<td width="100%"><code> [protected, virtual]</code></td>
546
<a class="anchor" name="d951cc2b1fe314805c5d735a0d7f467c"></a><!-- doxytag: member="xmlpp::SaxParser::on_fatal_error" ref="d951cc2b1fe314805c5d735a0d7f467c" args="(const Glib::ustring &text)" -->
547
<div class="memitem">
548
<div class="memproto">
549
<table class="memname">
551
<td class="memname">virtual void xmlpp::SaxParser::on_fatal_error </td>
553
<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>
554
<td class="paramname"> <em>text</em> </td>
555
<td> ) </td>
556
<td width="100%"><code> [protected, virtual]</code></td>
566
<a class="anchor" name="f6671ab7dbda78730a65dcbb58aa0ec1"></a><!-- doxytag: member="xmlpp::SaxParser::on_cdata_block" ref="f6671ab7dbda78730a65dcbb58aa0ec1" args="(const Glib::ustring &text)" -->
567
<div class="memitem">
568
<div class="memproto">
569
<table class="memname">
571
<td class="memname">virtual void xmlpp::SaxParser::on_cdata_block </td>
573
<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>
574
<td class="paramname"> <em>text</em> </td>
575
<td> ) </td>
576
<td width="100%"><code> [protected, virtual]</code></td>
586
<a class="anchor" name="4b453817ac37ea307c2ba023cc938794"></a><!-- doxytag: member="xmlpp::SaxParser::on_internal_subset" ref="4b453817ac37ea307c2ba023cc938794" args="(const Glib::ustring &name, const Glib::ustring &publicId, const Glib::ustring &systemId)" -->
587
<div class="memitem">
588
<div class="memproto">
589
<table class="memname">
591
<td class="memname">virtual void xmlpp::SaxParser::on_internal_subset </td>
593
<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>
594
<td class="paramname"> <em>name</em>, </td>
597
<td class="paramkey"></td>
599
<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>
600
<td class="paramname"> <em>publicId</em>, </td>
603
<td class="paramkey"></td>
605
<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>
606
<td class="paramname"> <em>systemId</em></td><td> </td>
611
<td></td><td></td><td width="100%"><code> [protected, virtual]</code></td>
618
Override this to receive information about the document's DTD and any entity declarations.
623
<a class="anchor" name="eb20c4424f325655ebd787c2b2268137"></a><!-- doxytag: member="xmlpp::SaxParser::on_get_entity" ref="eb20c4424f325655ebd787c2b2268137" args="(const Glib::ustring &name)" -->
624
<div class="memitem">
625
<div class="memproto">
626
<table class="memname">
628
<td class="memname">virtual _xmlEntity* xmlpp::SaxParser::on_get_entity </td>
630
<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>
631
<td class="paramname"> <em>name</em> </td>
632
<td> ) </td>
633
<td width="100%"><code> [protected, virtual]</code></td>
640
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.
642
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#b0985199cbdbd9a7ab31b024acf3c2c8">on_entity_declaration()</a> as well so that you can use that information when resolving the entity reference.<p>
643
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>
644
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>
645
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>
646
<dl compact><dt><b>Parameters:</b></dt><dd>
647
<table border="0" cellspacing="2" cellpadding="0">
648
<tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The entity reference name. </td></tr>
651
<dl class="return" 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>
655
<a class="anchor" name="b0985199cbdbd9a7ab31b024acf3c2c8"></a><!-- doxytag: member="xmlpp::SaxParser::on_entity_declaration" ref="b0985199cbdbd9a7ab31b024acf3c2c8" args="(const Glib::ustring &name, XmlEntityType type, const Glib::ustring &publicId, const Glib::ustring &systemId, const Glib::ustring &content)" -->
656
<div class="memitem">
657
<div class="memproto">
658
<table class="memname">
660
<td class="memname">virtual void xmlpp::SaxParser::on_entity_declaration </td>
662
<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>
663
<td class="paramname"> <em>name</em>, </td>
666
<td class="paramkey"></td>
668
<td class="paramtype"><a class="el" href="namespacexmlpp.html#0fa47f0fb103cf9ea460a2fef3f5be49">XmlEntityType</a> </td>
669
<td class="paramname"> <em>type</em>, </td>
672
<td class="paramkey"></td>
674
<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>
675
<td class="paramname"> <em>publicId</em>, </td>
678
<td class="paramkey"></td>
680
<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>
681
<td class="paramname"> <em>systemId</em>, </td>
684
<td class="paramkey"></td>
686
<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>
687
<td class="paramname"> <em>content</em></td><td> </td>
692
<td></td><td></td><td width="100%"><code> [protected, virtual]</code></td>
699
Override this to receive information about every entity declaration.
701
If you override this function, and you want normal entity substitution to work, then you must call the base class in your override.<p>
702
This would be useful when overriding <a class="el" href="classxmlpp_1_1SaxParser.html#eb20c4424f325655ebd787c2b2268137">on_get_entity()</a>.
705
<a class="anchor" name="839554028d8bad81774040eb67d23103"></a><!-- doxytag: member="xmlpp::SaxParser::release_underlying" ref="839554028d8bad81774040eb67d23103" args="()" -->
706
<div class="memitem">
707
<div class="memproto">
708
<table class="memname">
710
<td class="memname">virtual void xmlpp::SaxParser::release_underlying </td>
712
<td class="paramname"> </td>
713
<td> ) </td>
714
<td width="100%"><code> [protected, virtual]</code></td>
723
Reimplemented from <a class="el" href="classxmlpp_1_1Parser.html#346ebfb1219e1c0d3acbd017a07706e6">xmlpp::Parser</a>.
726
<hr><h2>Friends And Related Function Documentation</h2>
727
<a class="anchor" name="f6957a9354f608a7784028e9e94aba14"></a><!-- doxytag: member="xmlpp::SaxParser::SaxParserCallback" ref="f6957a9354f608a7784028e9e94aba14" args="" -->
728
<div class="memitem">
729
<div class="memproto">
730
<table class="memname">
732
<td class="memname">friend struct SaxParserCallback<code> [friend]</code> </td>
742
<hr>The documentation for this class was generated from the following file:<ul>
743
<li><a class="el" href="saxparser_8h.html">saxparser.h</a></ul>
744
<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 18 10:36:28 2007 for libxml++ by
745
<a href="http://www.doxygen.org/index.html">
746
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>