<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Mon Jun 09 23:45:36 GMT+03:30 1997 -->
<title>
  Class w3c.xmlOnline.tree.TreeListener
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-w3c.xmlOnline.tree.html">This Package</a>  <a href="w3c.xmlOnline.tree.Root.html#_top_">Previous</a>  <a href="Package-w3c.xmlOnline.tree.html">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class w3c.xmlOnline.tree.TreeListener
</h1>
<pre>
java.lang.Object
   |
   +----w3c.xmlOnline.tree.TreeListener
</pre>
<hr>
<dl>
  <dt> public class <b>TreeListener</b>
  <dt> extends Object
  <dt> implements <a href="w3c.xmlOnline.parser.XMLListener.html#_top_">XMLListener</a>
</dl>
A class that implements the XMLListener interface
 and uses it to build a tree corresponding to the
 XML document that is parsed.
<p>
<dl>
  <dt> <b>Version:</b>
  <dd> $Id: w3c.xmlOnline.tree.TreeListener.html,v 1.7 1997/06/09 22:26:24 bbos Exp $
  <dt> <b>Author:</b>
  <dd> Bert Bos
    <dt> <b>See Also:</b>
    <dd> <a href="w3c.xmlOnline.parser.Parser.html#_top_">Parser</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#TreeListener()"><b>TreeListener</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#doComments(boolean)"><b>doComments</b></a>(boolean)
  <dd>  Set a flag that determines whether comments are stored or ignored.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#doPIs(boolean)"><b>doPIs</b></a>(boolean)
  <dd>  Set a flag that determines whether PIs are stored or ignored.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleAttribute(java.lang.String, java.lang.String)"><b>handleAttribute</b></a>(String, String)
  <dd>  This function is called by the parser when it has
 recognized an attribute name/value pair.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleComment(java.lang.String)"><b>handleComment</b></a>(String)
  <dd>  This function is called by the parser when it has
 recognized a comment.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleData(java.lang.String)"><b>handleData</b></a>(String)
  <dd>  This function is called by the parser when it has
 recognized character data.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleEndDoc(java.lang.String)"><b>handleEndDoc</b></a>(String)
  <dd>  This function is called by the parser when it has
 recognized the end of a document or sub-document.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleEndTag(java.lang.String)"><b>handleEndTag</b></a>(String)
  <dd>  This function is called by the parser when it has
 recognized an end tag or the end of an empty tag.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handlePI(java.lang.String)"><b>handlePI</b></a>(String)
  <dd>  This function is called by the parser when it has
 recognized a processing instruction.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleStartDoc(java.lang.String, java.lang.String)"><b>handleStartDoc</b></a>(String, String)
  <dd>  This function is called by the parser when it has
 recognized a doctype declaration.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleStartTag(java.lang.String)"><b>handleStartTag</b></a>(String)
  <dd>  This function is called by the parser when it has
 recognized a start tag.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#root()"><b>root</b></a>()
  <dd>  Return the root of the XML tree

</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="TreeListener"></a>
<a name="TreeListener()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>TreeListener</b>
<pre>
 public TreeListener()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="doComments(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="doComments"><b>doComments</b></a>
<pre>
 public <a href="#_top_">TreeListener</a> doComments(boolean on)
</pre>
<dl>
  <dd> Set a flag that determines whether comments are stored or ignored.
 By default, comments are not stored (on = false).
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> on - if true, store comment nodes
    <dt> <b>Returns:</b>
    <dd> this
  </dl></dd>
</dl>
<a name="doPIs(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="doPIs"><b>doPIs</b></a>
<pre>
 public <a href="#_top_">TreeListener</a> doPIs(boolean on)
</pre>
<dl>
  <dd> Set a flag that determines whether PIs are stored or ignored.
 By default, PIs are not stored (on = false).
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> on - if true, store PI nodes
    <dt> <b>Returns:</b>
    <dd> this
  </dl></dd>
</dl>
<a name="root()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="root"><b>root</b></a>
<pre>
 public <a href="w3c.xmlOnline.tree.Root.html#_top_">Root</a> root()
</pre>
<dl>
  <dd> Return the root of the XML tree
<p>
</dl>
<a name="handleComment(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleComment"><b>handleComment</b></a>
<pre>
 public void handleComment(String comment)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized a comment.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> comment - the comment string (without &lt;!-- --&gt;)
  </dl></dd>
</dl>
<a name="handleStartTag(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleStartTag"><b>handleStartTag</b></a>
<pre>
 public void handleStartTag(String tag)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized a start tag.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> tag - the tag name in lowercase
  </dl></dd>
</dl>
<a name="handleAttribute(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleAttribute"><b>handleAttribute</b></a>
<pre>
 public void handleAttribute(String attribute,
                             String value)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized an attribute name/value pair. The attribute
 belongs to the tag that was handled by the most recent
 call to handleStartTag().
 <p>Note that there is no indication of whether this
 attribute was actually on the tag, or whether it
 is the declared default value for the attribute on
 this tag (&lt;?XML DEFAULT...?&gt;)
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> attribute - the name of the attribute in lowercase
    <dd> value - the value of the attribute (a string)
  </dl></dd>
</dl>
<a name="handleEndTag(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleEndTag"><b>handleEndTag</b></a>
<pre>
 public void handleEndTag(String tag)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized an end tag or the end of an empty tag.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> tag - the name of the tag in lowercase
  </dl></dd>
</dl>
<a name="handleData(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleData"><b>handleData</b></a>
<pre>
 public void handleData(String data)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized character data. The function may be called
 several times without intervening calls to handleStartTag()
 or handleEndTag(). The content of an element is thus the
 concatenation of all consecutive calls to handleData().
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> data - the character data
  </dl></dd>
</dl>
<a name="handlePI(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handlePI"><b>handlePI</b></a>
<pre>
 public void handlePI(String pi)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized a processing instruction.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> pi - the processing instruction (without &lt;? ?&gt;)
  </dl></dd>
</dl>
<a name="handleStartDoc(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleStartDoc"><b>handleStartDoc</b></a>
<pre>
 public void handleStartDoc(String name,
                            String doctype)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized a doctype declaration.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> root - the name of the start tag
    <dd> doctype - the URL defining the document type (may be null)
  </dl></dd>
</dl>
<a name="handleEndDoc(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleEndDoc"><b>handleEndDoc</b></a>
<pre>
 public void handleEndDoc(String root)
</pre>
<dl>
  <dd> This function is called by the parser when it has
 recognized the end of a document or sub-document.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> root - the name of the start tag
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-w3c.xmlOnline.tree.html">This Package</a>  <a href="w3c.xmlOnline.tree.Root.html#_top_">Previous</a>  <a href="Package-w3c.xmlOnline.tree.html">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
