<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<s1 title="TreeViewer Sample">
	<s2 title="Running TreeViewer">
		<p><code>TreeViewer</code> displays the input file in a graphical tree 
		based interface. This sample highlights the error handling 
		capabilities of the parser, demonstrating how the parser can 
		recover from many types of common errors.  </p>
		<p>Requirements:</p>
		<ul>
			<li>&javaparsername; is loaded on your computer.</li>
			<li>Either:</li>
			<ul><li>JDK 1.1.8 and Swing1.1.1 are is loaded on your computer.</li></ul>
			<li>Or:</li>
			<ul><li>Java 2 (jdk1.2.2)  is loaded on your computer.</li></ul>
		</ul>
		<p>Source code: </p>
		<ul>
			<li>TreeViewer.java</li>
			<li>TreeView.java</li>
			<li>DOMTree.java</li>
			<li>DefaultImages.java</li>
		</ul>
	</s2>

	<s2 title="TreeViewer">
		<p><em>To run TreeViewer:</em></p>
		<ol>
			<li>open up a MS-DOS command line window</li>
			<li>set the path to the jdk\bin directory</li>
			<li>change directory to the latest &javaparserdirectory; directory</li>
			<li>invoke the <code>TreeViewer</code> parser</li>
		</ol>
		
		<p><em>On Windows:</em></p>
		<p>The easiest way to do this is to create a .bat file using the 
		Notepad editor. Then <code>TreeViewer</code> can be invoked by double clicking 
		on the file name or icon. The following command lines assume that 
		both the jdk and the &javaparserdirectory; directories are located directly below 
		the c: dirve.</p>
		
		<p><em>With jdk1.1.8:</em></p>
<source>set path=c:\jdk1.1.8\bin;%PATH%
set classpath=c:\&javaparserdirectory;\&javaparserdirectory;.jar;%CLASSPATH%
set classpath=c:\&javaparserdirectory;\&javaparserdirectory;Samples;%CLASSPATH%;
set classpath=c:\Swing-1.1.1\swingall.jar;%CLASSPATH%;
cd c:\&javaparserdirectory;
java dom.TreeViewer data\personal.xml</source>
		
		<p><em>With jdk1.2.2:</em></p>
		<p>Swing is included in the Java 2 release and it doesn't required 
		a separate reference. </p>
<source>set path=c:\jdk1.2.2\bin;%PATH%
set classpath=c:\&javaparserdirectory;\&javaparserdirectory;.jar;%CLASSPATH%
set classpath=c:\&javaparserdirectory;\&javaparserdirectory;Samples;%CLASSPATH%;
cd c:\&javaparserdirectory;
java dom.TreeViewer data\personal.xml</source>

		<note>Parse your own XML file instead of data\personal.xml</note>
	</s2>
</s1>
