<!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.Root
</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.PI.html#_top_">Previous</a>  <a href="w3c.xmlOnline.tree.TreeListener.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class w3c.xmlOnline.tree.Root
</h1>
<pre>
java.lang.Object
   |
   +----<a href="w3c.xmlOnline.tree.Node.html#_top_">w3c.xmlOnline.tree.Node</a>
           |
           +----<a href="w3c.xmlOnline.tree.Element.html#_top_">w3c.xmlOnline.tree.Element</a>
                   |
                   +----w3c.xmlOnline.tree.Root
</pre>
<hr>
<dl>
  <dt> public class <b>Root</b>
  <dt> extends <a href="w3c.xmlOnline.tree.Element.html#_top_">Element</a>
</dl>
The root node of the XML tree corresponds to the document
 itself. It may have an `extid,' the external ID
 of the document type, usually a URL that points to a DTD.
<p>
<dl>
  <dt> <b>Version:</b>
  <dd> $Id: w3c.xmlOnline.tree.Root.html,v 1.7 1997/06/09 22:26:15 bbos Exp $
  <dt> <b>Author:</b>
  <dd> Bert Bos
</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="#Root(w3c.xmlOnline.tree.Node, java.lang.String, int)"><b>Root</b></a>(Node, String, int)
  <dd>  Create a new Root node.
</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="#addID(java.lang.String, w3c.xmlOnline.tree.Element)"><b>addID</b></a>(String, Element)
  <dd>  Add the caller to the idTable, with the given ID as key.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#dumpTree(java.io.PrintStream)"><b>dumpTree</b></a>(PrintStream)
  <dd>  A method to write out the content of
 the node in correct XML syntax.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#extID()"><b>extID</b></a>()
  <dd>  Return the external name of the document type.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#findID(java.lang.String)"><b>findID</b></a>(String)
  <dd>  Return the element with a certain ID in the tree
 around this element.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ids()"><b>ids</b></a>()
  <dd>  Return an enumeration of all IDs in the tree.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setExtID(java.lang.String)"><b>setExtID</b></a>(String)
  <dd>  Set the external name of the document type.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Root"></a>
<a name="Root(w3c.xmlOnline.tree.Node, java.lang.String, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Root</b>
<pre>
 public Root(<a href="w3c.xmlOnline.tree.Node.html#_top_">Node</a> parent,
             String name,
             int nr)
</pre>
<dl>
  <dd> Create a new Root node.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> the - parent node
    <dd> name - the name of this node
    <dd> nr - the sequence number of the node in the tree
    <dt> <b>Returns:</b>
    <dd> the new Root node
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="setExtID(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setExtID"><b>setExtID</b></a>
<pre>
 public <a href="#_top_">Root</a> setExtID(String ext)
</pre>
<dl>
  <dd> Set the external name of the document type.
 This is normally a URL.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ext - the external name of the document type
    <dt> <b>Returns:</b>
    <dd> this
  </dl></dd>
</dl>
<a name="extID()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="extID"><b>extID</b></a>
<pre>
 public String extID()
</pre>
<dl>
  <dd> Return the external name of the document type.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the external name of the document type
  </dl></dd>
</dl>
<a name="addID(java.lang.String, w3c.xmlOnline.tree.Element)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="addID"><b>addID</b></a>
<pre>
 protected <a href="w3c.xmlOnline.tree.Node.html#_top_">Node</a> addID(String ID,
                      <a href="w3c.xmlOnline.tree.Element.html#_top_">Element</a> elt)
</pre>
<dl>
  <dd> Add the caller to the idTable, with the given ID as key.
 An element that has an attribute called "ID" will use
 this method to add itself to the idTable of its root
 element. If this Root is not the root of the tree,
 it will pass the request on to its parent, and it will
 percolate up the tree until it reaches the root of the
 tree.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ID - the ID of the element to add
    <dd> elt - the element to add
    <dt> <b>Returns:</b>
    <dd> this
    <dt> <b>Overrides:</b>
    <dd> <a href="w3c.xmlOnline.tree.Element.html#addID(java.lang.String, w3c.xmlOnline.tree.Element)">addID</a> in class <a href="w3c.xmlOnline.tree.Element.html#_top_">Element</a>
  </dl></dd>
</dl>
<a name="findID(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="findID"><b>findID</b></a>
<pre>
 public <a href="w3c.xmlOnline.tree.Node.html#_top_">Node</a> findID(String ID)
</pre>
<dl>
  <dd> Return the element with a certain ID in the tree
 around this element. If this Root is not the root of the
 tree, it will pass the request up to the real root.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ID - the ID to look for
    <dt> <b>Returns:</b>
    <dd> the element with that ID, or null
    <dt> <b>Overrides:</b>
    <dd> <a href="w3c.xmlOnline.tree.Element.html#findID(java.lang.String)">findID</a> in class <a href="w3c.xmlOnline.tree.Element.html#_top_">Element</a>
  </dl></dd>
</dl>
<a name="ids()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="ids"><b>ids</b></a>
<pre>
 public Enumeration ids()
</pre>
<dl>
  <dd> Return an enumeration of all IDs in the tree.
 If this Root is not the root of the tree,
 it will pass the request up to the real root.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> an enumeration of all IDs in the tree
    <dt> <b>Overrides:</b>
    <dd> <a href="w3c.xmlOnline.tree.Element.html#ids()">ids</a> in class <a href="w3c.xmlOnline.tree.Element.html#_top_">Element</a>
  </dl></dd>
</dl>
<a name="dumpTree(java.io.PrintStream)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="dumpTree"><b>dumpTree</b></a>
<pre>
 public void dumpTree(PrintStream out)
</pre>
<dl>
  <dd> A method to write out the content of
 the node in correct XML syntax.
 but no checking is done.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> out - the PrintStream to write on
    <dt> <b>Overrides:</b>
    <dd> <a href="w3c.xmlOnline.tree.Element.html#dumpTree(java.io.PrintStream)">dumpTree</a> in class <a href="w3c.xmlOnline.tree.Element.html#_top_">Element</a>
  </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.PI.html#_top_">Previous</a>  <a href="w3c.xmlOnline.tree.TreeListener.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
