<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000080 face=Verdana size=2>Hi </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>When I am replacing Builder with 
DOMBuilder(page no 354 - Java and XML Oreilly -as per errata javaxml.800), I am 
facing&nbsp;one probem during compilation&nbsp;and the probem is described 
below:</FONT></DIV>
<DIV><FONT color=#000080 face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>Page No: 354 / Java and Xml by 
Oreilly</FONT></DIV>
<DIV><FONT color=#000080 face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>E:\xml_test\jdom\src&gt;javac 
XmlRpcConfiguration.java<BR>XmlRpcConfiguration.java:140: Incompatible type for 
method. Explicit cast needed to convert java.io<BR>Stream to 
org.w3c.dom.Document.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Document doc = 
builder.build(in);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
^<BR>1 error</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>The same problem occured even for 
DOMTest probem,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>The source code DOMTest.java is 
given below:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2><BR>import java.io.File;<BR>import 
java.io.IOException;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>import org.jdom.Document;<BR>import 
org.jdom.Element;<BR>import org.jdom.JDOMException;<BR>import 
org.jdom.input.DOMBuilder;<BR><A href="file://import">file://import</A> 
org.jdom.input.Builder; -</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>public class DOMTest {</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>&nbsp; public static void 
main(String[] args) {</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>&nbsp;&nbsp;&nbsp; if (args.length 
!=1 )<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("Usage : java DOMTest [filename to parse] 
");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<BR>&nbsp;&nbsp;&nbsp; 
}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>&nbsp;&nbsp;&nbsp; 
try<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DOMBuilder builder 
=&nbsp; new 
DOMBuilder("org.jdom.adapters.OracleV2DOmAdapter");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Document doc = builder.build(new File(args[0]));</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("Document Successfully Read");<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp; catch (JDOMException 
e)<BR>&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
e.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>&nbsp; }<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>After implementing the corrections, 
as specified javaxml.800,ie:<BR>removing the import org.jdom.input.Builder and 
replacing the Builder with DOMBuilder, The following error is occuring after 
compiling: </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>E:\xml_test\jdom\src&gt;javac 
DOMTest.java<BR>DOMTest.java:26: Incompatible type for method. Explicit cast 
needed to convert java.io.File to 
org.<BR>m.Document.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Document doc = 
builder.build(new 
File(args[0]));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
^<BR>1 error</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>Please send me the suggestions to 
<A href="mailto:harish.kumar@patni.com">harish.kumar@patni.com</A></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>Regards</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000080 face=Verdana size=2>Harish<BR></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>