Hi Ray
First of all it looks like JBuilder has put an old version of JAXP on the
classpath (probably JAXP 1.0) which is why dom4j can't use it to get hold of
a SAX parser. So its reporting that it cannot use JAXP and is trying to use
the embedded Aelfred parser instead.
Unfortunately the Aelfred parser expects all strings to be in URL format, so
its treating "E:/" as a protocol "e". Either using a recent crimson or
xerces jar which come with JAXP 1.1 or changing your string to be
file:///e:/... should fix it
James
----- Original Message -----
From: "Ray Price" <[EMAIL PROTECTED]>
To: "Dom4j-User (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, November 14, 2001 3:19 PM
Subject: [dom4j-user] dom4j Newbie - Help getting started
> I'm in the process of simultaneously developing my Java and XML skills,
and
> have settled on dom4j as a good place to get started. After playing with
> Forte, VAJ, and JBuilder, I've settled on JBuilder as the the best
> compromise for me in terms of using an IDE (Forte dropped due to strange
> windowing behavior on Win 98, and VAJ dropped because the repository
> paradigm was just too complicated for what I wanted to do).
>
> Now I have a small test case from the dom4j quickstart in JBuilder 5 and
it
> compiles fine. When I try to run it, I get the following:
>
> Warning: Error occurred using JAXP to load a SAXParser. Will use Aelfred
> instead
> Doc Exception -- unknown protocol: e Nested exception: unknown protocol: e
>
> I've seen the reference to defining org.dom4j.verbose as True to get
further
> details, but I'm not sure how to set that in JBuilder. Any ideas?
> The "Doc Exception" is a message I inserted before printing the
exception's
> message which follows as "unknown protocol..." Can anyone point me in the
> right direction to resolve this one?
> My import statements are:
> import java.io.*;
> import java.util.*;
> import org.xml.sax.*;
> import org.dom4j.*;
> import org.dom4j.io.SAXReader;
>
> The code that is causing the problem is:
> public void parseXMLintoDoc(String strFile) throws DocumentException
> {
> SAXReader xmlReader = new SAXReader();
> docRecipes = xmlReader.read(strFile); //Exception from this line
> }
> where strFile = "E:\My Documents\java\jbRecipe\recipe1.xml"
>
> Hope this is enough to go on.
>
> Thanks.
>
> Ray.
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user