source: NonGTP/Xerces/xerces/doc/html/apiDocs/classParser.html @ 358

Revision 358, 32.6 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>Parser class Reference</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR>
2  <A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
3
4  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
5
6  <A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
7  <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
8  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
9  <A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
10  <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-18');" onMouseOver="rolloverOn('side-ext-18');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-18" onLoad="rolloverLoad('side-ext-18','../graphics/ext-18-label-2.jpg','../graphics/ext-18-label-3.jpg');" src="../graphics/ext-18-label-3.jpg" vspace="0" width="120"></A><BR>
11  <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR>
12
13  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
14  <A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR> 
15  <A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
16  <A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR> 
17
18  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> 
19  <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','../graphics/ext-68-label-2.jpg','../graphics/ext-68-label-3.jpg');" src="../graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
20
21  <A href="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
22  <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR>
23
24  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
25
26  <A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR>
27  <A href="../bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR> 
28  <A href="../pdf.html" onMouseOut="rolloverOff('side-pdf');" onMouseOver="rolloverOn('side-pdf');"><IMG alt="PDF Document" border="0" height="12" hspace="0" name="side-pdf" onLoad="rolloverLoad('side-pdf','../graphics/pdf-label-2.jpg','../graphics/pdf-label-3.jpg');" src="../graphics/pdf-label-3.jpg" vspace="0" width="120"></A><BR>
29
30  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
31
32  <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-100');" onMouseOver="rolloverOn('side-ext-100');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-100" onLoad="rolloverLoad('side-ext-100','../graphics/ext-100-label-2.jpg','../graphics/ext-100-label-3.jpg');" src="../graphics/ext-100-label-3.jpg" vspace="0" width="120"></A><BR>
33
34  <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-102" onLoad="rolloverLoad('side-ext-102','../graphics/ext-102-label-2.jpg','../graphics/ext-102-label-3.jpg');" src="../graphics/ext-102-label-3.jpg" vspace="0" width="120"></A><BR>
35
36
37<IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD>
38    <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">
39
40            <P>
41<!-- Generated by Doxygen 1.2.14 -->
42<center>
43<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
44<hr><h1>Parser  Class Reference</h1>Basic interface for SAX (Simple API for XML) parsers.
45<a href="#_details">More...</a>
46<p>
47Inheritance diagram for Parser:<p><center><img src="classParser__inherit__graph.gif" border="0" usemap="#Parser__inherit__map" alt="Inheritance graph"></center>
48<map name="Parser__inherit__map">
49<area href="classSAXParser.html" shape="rect" coords="7,105,87,87" alt="">
50</map>
51<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classParser-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
52<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
53<tr><td colspan="2"><div class="groupHeader">Constructors and Destructor</div></td></tr>
54<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z440_0">Parser</a> ()</td></tr>
55<tr><td>&nbsp;</td><td><font size=-1><em>The default constructor.</em> <a href="#z440_0">More...</a><em></em></font><br><br></td></tr>
56<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z440_1">~Parser</a> ()</td></tr>
57<tr><td>&nbsp;</td><td><font size=-1><em>The destructor.</em> <a href="#z440_1">More...</a><em></em></font><br><br></td></tr>
58<tr><td colspan="2"><div class="groupHeader">The parser interfaces</div></td></tr>
59<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z441_0">setEntityResolver</a> (<a class="el" href="classEntityResolver.html">EntityResolver</a> *const resolver)=0</td></tr>
60<tr><td>&nbsp;</td><td><font size=-1><em>Allow an application to register a custom entity resolver.</em> <a href="#z441_0">More...</a><em></em></font><br><br></td></tr>
61<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z441_1">setDTDHandler</a> (<a class="el" href="classDTDHandler.html">DTDHandler</a> *const handler)=0</td></tr>
62<tr><td>&nbsp;</td><td><font size=-1><em>Allow an application to register a DTD event handler.</em> <a href="#z441_1">More...</a><em></em></font><br><br></td></tr>
63<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z441_2">setDocumentHandler</a> (<a class="el" href="classDocumentHandler.html">DocumentHandler</a> *const handler)=0</td></tr>
64<tr><td>&nbsp;</td><td><font size=-1><em>Allow an application to register a document event handler.</em> <a href="#z441_2">More...</a><em></em></font><br><br></td></tr>
65<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z441_3">setErrorHandler</a> (<a class="el" href="classErrorHandler.html">ErrorHandler</a> *const handler)=0</td></tr>
66<tr><td>&nbsp;</td><td><font size=-1><em>Allow an application to register an error event handler.</em> <a href="#z441_3">More...</a><em></em></font><br><br></td></tr>
67<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z441_4">parse</a> (const <a class="el" href="classInputSource.html">InputSource</a> &amp;source)=0</td></tr>
68<tr><td>&nbsp;</td><td><font size=-1><em>Parse an XML document.</em> <a href="#z441_4">More...</a><em></em></font><br><br></td></tr>
69<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z441_5">parse</a> (const XMLCh *const systemId)=0</td></tr>
70<tr><td>&nbsp;</td><td><font size=-1><em>Parse an XML document from a system identifier (URI).</em> <a href="#z441_5">More...</a><em></em></font><br><br></td></tr>
71<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classParser.html#z441_6">parse</a> (const char *const systemId)=0</td></tr>
72<tr><td>&nbsp;</td><td><font size=-1><em>Parse an XML document from a system identifier (URI).</em> <a href="#z441_6">More...</a><em></em></font><br><br></td></tr>
73</table>
74<hr><a name="_details"></a><h2>Detailed Description</h2>
75Basic interface for SAX (Simple API for XML) parsers.
76<p>
77All SAX parsers must implement this basic interface: it allows applications to register handlers for different types of events and to initiate a parse from a URI, or a character stream.
78<p>
79All SAX parsers must also implement a zero-argument constructor (though other constructors are also allowed).
80<p>
81SAX parsers are reusable but not re-entrant: the application may reuse a parser object (possibly with a different input source) once the first parse has completed successfully, but it may not invoke the <a class="el" href="classParser.html#z441_4">parse</a>() methods recursively within a parse.
82<p>
83<dl compact><dt><b>
84See also: </b><dd>
85<a class="el" href="classEntityResolver.html#z424_0">EntityResolver::EntityResolver</a> , <a class="el" href="classDTDHandler.html#z422_0">DTDHandler::DTDHandler</a> , <a class="el" href="classDocumentHandler.html#z420_0">DocumentHandler::DocumentHandler</a> , <a class="el" href="classErrorHandler.html#z426_0">ErrorHandler::ErrorHandler</a> , <a class="el" href="classHandlerBase.html#a0">HandlerBase::HandlerBase</a> , <a class="el" href="classInputSource.html#z437_0">InputSource::InputSource</a> </dl>
86<p>
87<hr><h2>Constructor &amp; Destructor Documentation</h2>
88<a name="z440_0" doxytag="Parser::Parser"></a><p>
89<table width="100%" cellpadding="2" cellspacing="0" border="0">
90  <tr>
91    <td class="md">
92      <table cellpadding="0" cellspacing="0" border="0">
93        <tr>
94          <td class="md" nowrap valign="top"> Parser::Parser </td>
95          <td class="md" valign="top">(&nbsp;</td>
96          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
97          <td class="md" valign="top">)&nbsp;</td>
98          <td class="md" nowrap></td>
99        </tr>
100
101      </table>
102    </td>
103  </tr>
104</table>
105<table cellspacing=5 cellpadding=0 border=0>
106  <tr>
107    <td>
108      &nbsp;
109    </td>
110    <td>
111
112<p>
113The default constructor.
114<p>
115    </td>
116  </tr>
117</table>
118<a name="z440_1" doxytag="Parser::~Parser"></a><p>
119<table width="100%" cellpadding="2" cellspacing="0" border="0">
120  <tr>
121    <td class="md">
122      <table cellpadding="0" cellspacing="0" border="0">
123        <tr>
124          <td class="md" nowrap valign="top"> virtual Parser::~Parser </td>
125          <td class="md" valign="top">(&nbsp;</td>
126          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
127          <td class="md" valign="top">)&nbsp;</td>
128          <td class="md" nowrap><code> [virtual]</code></td>
129        </tr>
130
131      </table>
132    </td>
133  </tr>
134</table>
135<table cellspacing=5 cellpadding=0 border=0>
136  <tr>
137    <td>
138      &nbsp;
139    </td>
140    <td>
141
142<p>
143The destructor.
144<p>
145    </td>
146  </tr>
147</table>
148<hr><h2>Member Function Documentation</h2>
149<a name="z441_6" doxytag="Parser::parse"></a><p>
150<table width="100%" cellpadding="2" cellspacing="0" border="0">
151  <tr>
152    <td class="md">
153      <table cellpadding="0" cellspacing="0" border="0">
154        <tr>
155          <td class="md" nowrap valign="top"> virtual void Parser::parse </td>
156          <td class="md" valign="top">(&nbsp;</td>
157          <td class="md" nowrap valign="top">const char *const&nbsp;</td>
158          <td class="mdname1" valign="top" nowrap>&nbsp; <em>systemId</em>          </td>
159          <td class="md" valign="top">)&nbsp;</td>
160          <td class="md" nowrap><code> [pure virtual]</code></td>
161        </tr>
162
163      </table>
164    </td>
165  </tr>
166</table>
167<table cellspacing=5 cellpadding=0 border=0>
168  <tr>
169    <td>
170      &nbsp;
171    </td>
172    <td>
173
174<p>
175Parse an XML document from a system identifier (URI).
176<p>
177This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of the following:
178<p>
179parse(new URLInputSource(systemId));
180<p>
181If the system identifier is a URL, it must be fully resolved by the application before it is passed to the parser.<dl compact><dt><b>
182Parameters: </b><dd>
183<table border=0 cellspacing=2 cellpadding=0>
184<tr><td valign=top><em>systemId</em>&nbsp;</td><td>
185The system identifier (URI). </td></tr>
186</table>
187</dl><dl compact><dt><b>
188Exceptions: </b><dd>
189<table border=0 cellspacing=2 cellpadding=0>
190<tr><td valign=top><em><a class="el" href="classSAXException.html">SAXException</a></em>&nbsp;</td><td>
191 Any SAX exception, possibly wrapping another exception. </td></tr>
192<tr><td valign=top><em><a class="el" href="classXMLException.html">XMLException</a></em>&nbsp;</td><td>
193 An exception from the parser or client handler code. </td></tr>
194</table>
195</dl><dl compact><dt><b>
196See also: </b><dd>
197parse(InputSource) </dl>
198<p>
199Implemented in <a class="el" href="classSAXParser.html#z468_2">SAXParser</a>.    </td>
200  </tr>
201</table>
202<a name="z441_5" doxytag="Parser::parse"></a><p>
203<table width="100%" cellpadding="2" cellspacing="0" border="0">
204  <tr>
205    <td class="md">
206      <table cellpadding="0" cellspacing="0" border="0">
207        <tr>
208          <td class="md" nowrap valign="top"> virtual void Parser::parse </td>
209          <td class="md" valign="top">(&nbsp;</td>
210          <td class="md" nowrap valign="top">const XMLCh *const&nbsp;</td>
211          <td class="mdname1" valign="top" nowrap>&nbsp; <em>systemId</em>          </td>
212          <td class="md" valign="top">)&nbsp;</td>
213          <td class="md" nowrap><code> [pure virtual]</code></td>
214        </tr>
215
216      </table>
217    </td>
218  </tr>
219</table>
220<table cellspacing=5 cellpadding=0 border=0>
221  <tr>
222    <td>
223      &nbsp;
224    </td>
225    <td>
226
227<p>
228Parse an XML document from a system identifier (URI).
229<p>
230This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of the following:
231<p>
232parse(new URLInputSource(systemId));
233<p>
234If the system identifier is a URL, it must be fully resolved by the application before it is passed to the parser.<dl compact><dt><b>
235Parameters: </b><dd>
236<table border=0 cellspacing=2 cellpadding=0>
237<tr><td valign=top><em>systemId</em>&nbsp;</td><td>
238The system identifier (URI). </td></tr>
239</table>
240</dl><dl compact><dt><b>
241Exceptions: </b><dd>
242<table border=0 cellspacing=2 cellpadding=0>
243<tr><td valign=top><em><a class="el" href="classSAXException.html">SAXException</a></em>&nbsp;</td><td>
244 Any SAX exception, possibly wrapping another exception. </td></tr>
245<tr><td valign=top><em><a class="el" href="classXMLException.html">XMLException</a></em>&nbsp;</td><td>
246 An exception from the parser or client handler code. </td></tr>
247</table>
248</dl><dl compact><dt><b>
249See also: </b><dd>
250parse(InputSource) </dl>
251<p>
252Implemented in <a class="el" href="classSAXParser.html#z468_1">SAXParser</a>.    </td>
253  </tr>
254</table>
255<a name="z441_4" doxytag="Parser::parse"></a><p>
256<table width="100%" cellpadding="2" cellspacing="0" border="0">
257  <tr>
258    <td class="md">
259      <table cellpadding="0" cellspacing="0" border="0">
260        <tr>
261          <td class="md" nowrap valign="top"> virtual void Parser::parse </td>
262          <td class="md" valign="top">(&nbsp;</td>
263          <td class="md" nowrap valign="top">const <a class="el" href="classInputSource.html">InputSource</a> &amp;&nbsp;</td>
264          <td class="mdname1" valign="top" nowrap>&nbsp; <em>source</em>          </td>
265          <td class="md" valign="top">)&nbsp;</td>
266          <td class="md" nowrap><code> [pure virtual]</code></td>
267        </tr>
268
269      </table>
270    </td>
271  </tr>
272</table>
273<table cellspacing=5 cellpadding=0 border=0>
274  <tr>
275    <td>
276      &nbsp;
277    </td>
278    <td>
279
280<p>
281Parse an XML document.
282<p>
283The application can use this method to instruct the SAX parser to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).
284<p>
285Applications may not invoke this method while a parse is in progress (they should create a new Parser instead for each additional XML document). Once a parse is complete, an application may reuse the same Parser object, possibly with a different input source.<dl compact><dt><b>
286Parameters: </b><dd>
287<table border=0 cellspacing=2 cellpadding=0>
288<tr><td valign=top><em>source</em>&nbsp;</td><td>
289The input source for the top-level of the XML document. </td></tr>
290</table>
291</dl><dl compact><dt><b>
292Exceptions: </b><dd>
293<table border=0 cellspacing=2 cellpadding=0>
294<tr><td valign=top><em><a class="el" href="classSAXException.html">SAXException</a></em>&nbsp;</td><td>
295 Any SAX exception, possibly wrapping another exception. </td></tr>
296<tr><td valign=top><em><a class="el" href="classXMLException.html">XMLException</a></em>&nbsp;</td><td>
297 An exception from the parser or client handler code. </td></tr>
298</table>
299</dl><dl compact><dt><b>
300See also: </b><dd>
301<a class="el" href="classInputSource.html#z437_0">InputSource::InputSource</a> , <a class="el" href="classParser.html#z441_0">setEntityResolver</a> , <a class="el" href="classParser.html#z441_1">setDTDHandler</a> , <a class="el" href="classParser.html#z441_2">setDocumentHandler</a> , <a class="el" href="classParser.html#z441_3">setErrorHandler</a> </dl>
302<p>
303Implemented in <a class="el" href="classSAXParser.html#z468_0">SAXParser</a>.    </td>
304  </tr>
305</table>
306<a name="z441_2" doxytag="Parser::setDocumentHandler"></a><p>
307<table width="100%" cellpadding="2" cellspacing="0" border="0">
308  <tr>
309    <td class="md">
310      <table cellpadding="0" cellspacing="0" border="0">
311        <tr>
312          <td class="md" nowrap valign="top"> virtual void Parser::setDocumentHandler </td>
313          <td class="md" valign="top">(&nbsp;</td>
314          <td class="md" nowrap valign="top"><a class="el" href="classDocumentHandler.html">DocumentHandler</a> *const&nbsp;</td>
315          <td class="mdname1" valign="top" nowrap>&nbsp; <em>handler</em>          </td>
316          <td class="md" valign="top">)&nbsp;</td>
317          <td class="md" nowrap><code> [pure virtual]</code></td>
318        </tr>
319
320      </table>
321    </td>
322  </tr>
323</table>
324<table cellspacing=5 cellpadding=0 border=0>
325  <tr>
326    <td>
327      &nbsp;
328    </td>
329    <td>
330
331<p>
332Allow an application to register a document event handler.
333<p>
334If the application does not register a document handler, all document events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by <a class="el" href="classHandlerBase.html">HandlerBase</a>).
335<p>
336Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.<dl compact><dt><b>
337Parameters: </b><dd>
338<table border=0 cellspacing=2 cellpadding=0>
339<tr><td valign=top><em>handler</em>&nbsp;</td><td>
340The document handler. </td></tr>
341</table>
342</dl><dl compact><dt><b>
343See also: </b><dd>
344<a class="el" href="classDocumentHandler.html#z420_0">DocumentHandler::DocumentHandler</a> , <a class="el" href="classHandlerBase.html#a0">HandlerBase::HandlerBase</a> </dl>
345<p>
346Implemented in <a class="el" href="classSAXParser.html#z468_3">SAXParser</a>.    </td>
347  </tr>
348</table>
349<a name="z441_1" doxytag="Parser::setDTDHandler"></a><p>
350<table width="100%" cellpadding="2" cellspacing="0" border="0">
351  <tr>
352    <td class="md">
353      <table cellpadding="0" cellspacing="0" border="0">
354        <tr>
355          <td class="md" nowrap valign="top"> virtual void Parser::setDTDHandler </td>
356          <td class="md" valign="top">(&nbsp;</td>
357          <td class="md" nowrap valign="top"><a class="el" href="classDTDHandler.html">DTDHandler</a> *const&nbsp;</td>
358          <td class="mdname1" valign="top" nowrap>&nbsp; <em>handler</em>          </td>
359          <td class="md" valign="top">)&nbsp;</td>
360          <td class="md" nowrap><code> [pure virtual]</code></td>
361        </tr>
362
363      </table>
364    </td>
365  </tr>
366</table>
367<table cellspacing=5 cellpadding=0 border=0>
368  <tr>
369    <td>
370      &nbsp;
371    </td>
372    <td>
373
374<p>
375Allow an application to register a DTD event handler.
376<p>
377If the application does not register a DTD handler, all DTD events reported by the SAX parser will be silently ignored (this is the default behaviour implemented by <a class="el" href="classHandlerBase.html">HandlerBase</a>).
378<p>
379Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.<dl compact><dt><b>
380Parameters: </b><dd>
381<table border=0 cellspacing=2 cellpadding=0>
382<tr><td valign=top><em>handler</em>&nbsp;</td><td>
383The DTD handler. </td></tr>
384</table>
385</dl><dl compact><dt><b>
386See also: </b><dd>
387<a class="el" href="classDTDHandler.html#z422_0">DTDHandler::DTDHandler</a> , <a class="el" href="classHandlerBase.html#a0">HandlerBase::HandlerBase</a> </dl>
388<p>
389Implemented in <a class="el" href="classSAXParser.html#z468_4">SAXParser</a>.    </td>
390  </tr>
391</table>
392<a name="z441_0" doxytag="Parser::setEntityResolver"></a><p>
393<table width="100%" cellpadding="2" cellspacing="0" border="0">
394  <tr>
395    <td class="md">
396      <table cellpadding="0" cellspacing="0" border="0">
397        <tr>
398          <td class="md" nowrap valign="top"> virtual void Parser::setEntityResolver </td>
399          <td class="md" valign="top">(&nbsp;</td>
400          <td class="md" nowrap valign="top"><a class="el" href="classEntityResolver.html">EntityResolver</a> *const&nbsp;</td>
401          <td class="mdname1" valign="top" nowrap>&nbsp; <em>resolver</em>          </td>
402          <td class="md" valign="top">)&nbsp;</td>
403          <td class="md" nowrap><code> [pure virtual]</code></td>
404        </tr>
405
406      </table>
407    </td>
408  </tr>
409</table>
410<table cellspacing=5 cellpadding=0 border=0>
411  <tr>
412    <td>
413      &nbsp;
414    </td>
415    <td>
416
417<p>
418Allow an application to register a custom entity resolver.
419<p>
420If the application does not register an entity resolver, the SAX parser will resolve system identifiers and open connections to entities itself (this is the default behaviour implemented in <a class="el" href="classHandlerBase.html">HandlerBase</a>).
421<p>
422Applications may register a new or different entity resolver in the middle of a parse, and the SAX parser must begin using the new resolver immediately.<dl compact><dt><b>
423Parameters: </b><dd>
424<table border=0 cellspacing=2 cellpadding=0>
425<tr><td valign=top><em>resolver</em>&nbsp;</td><td>
426The object for resolving entities. </td></tr>
427</table>
428</dl><dl compact><dt><b>
429See also: </b><dd>
430<a class="el" href="classEntityResolver.html#z424_0">EntityResolver::EntityResolver</a> , <a class="el" href="classHandlerBase.html#a0">HandlerBase::HandlerBase</a> </dl>
431<p>
432Implemented in <a class="el" href="classSAXParser.html#z468_7">SAXParser</a>.    </td>
433  </tr>
434</table>
435<a name="z441_3" doxytag="Parser::setErrorHandler"></a><p>
436<table width="100%" cellpadding="2" cellspacing="0" border="0">
437  <tr>
438    <td class="md">
439      <table cellpadding="0" cellspacing="0" border="0">
440        <tr>
441          <td class="md" nowrap valign="top"> virtual void Parser::setErrorHandler </td>
442          <td class="md" valign="top">(&nbsp;</td>
443          <td class="md" nowrap valign="top"><a class="el" href="classErrorHandler.html">ErrorHandler</a> *const&nbsp;</td>
444          <td class="mdname1" valign="top" nowrap>&nbsp; <em>handler</em>          </td>
445          <td class="md" valign="top">)&nbsp;</td>
446          <td class="md" nowrap><code> [pure virtual]</code></td>
447        </tr>
448
449      </table>
450    </td>
451  </tr>
452</table>
453<table cellspacing=5 cellpadding=0 border=0>
454  <tr>
455    <td>
456      &nbsp;
457    </td>
458    <td>
459
460<p>
461Allow an application to register an error event handler.
462<p>
463If the application does not register an error event handler, all error events reported by the SAX parser will be silently ignored, except for fatalError, which will throw a <a class="el" href="classSAXException.html">SAXException</a> (this is the default behaviour implemented by <a class="el" href="classHandlerBase.html">HandlerBase</a>).
464<p>
465Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.<dl compact><dt><b>
466Parameters: </b><dd>
467<table border=0 cellspacing=2 cellpadding=0>
468<tr><td valign=top><em>handler</em>&nbsp;</td><td>
469The error handler. </td></tr>
470</table>
471</dl><dl compact><dt><b>
472See also: </b><dd>
473<a class="el" href="classErrorHandler.html#z426_0">ErrorHandler::ErrorHandler</a> , <a class="el" href="classSAXException.html#z442_0">SAXException::SAXException</a> , <a class="el" href="classHandlerBase.html#a0">HandlerBase::HandlerBase</a> </dl>
474<p>
475Implemented in <a class="el" href="classSAXParser.html#z468_5">SAXParser</a>.    </td>
476  </tr>
477</table>
478<hr>The documentation for this class was generated from the following file:<ul>
479<li><a class="el" href="Parser_8hpp-source.html">Parser.hpp</a></ul>
480    </FONT></TD></TR></TABLE><BR>
481</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
482              Copyright &copy; 1994-2004 The Apache Software Foundation.
483              All Rights Reserved.
484            </I></FONT></TD></TR></TABLE></BODY></HTML>
Note: See TracBrowser for help on using the repository browser.