First off i'd recommend not using jaxp.jar any more and if you're using
xerces then use either xmlParserAPIs.jar or xml-apis.jar from
xml.apache.org. The former comes with Xerces and the latter is available
seperately and comes with Xalan.

xmlParserAPIs.jar = the parser part of JAXP
xml-apis.jar = all of JAXP

Basically JAXP has a way of configuring which parser to use via the
META-INF/services/ mechanism. My guess is that the jaxp.jar contains the
configuration for crimson.

As described in the javadoc

http://dom4j.org/javadoc/org/dom4j/io/SAXReader.html

you can set the 'org.dom4j.verbose' system property to be "true" to see more
detailed logging of why JAXP can't find a valid XML parser.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Carlos Barroso" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 9:43 AM
Subject: [dom4j-user] Problems in configuring jaxp with dom4j


> Hy there.
> In my CLASSPATH I have: dom4j.jar, xercesImpl.jar, jaxp.jar
> I have created a "jaxp.properties" file in <JAVA_HOME>/jre/lib directory
> with the following line:
>
>
>
javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryIm
> pl
>
>
> ----------------------------------------
> This is my small test class:
> ----------------------------------------
>
> import org.dom4j.Document;
> import org.dom4j.DocumentException;
> import org.dom4j.io.SAXReader;
> import org.dom4j.Node;
>
> public class Test {
>   public static void main(String[] args) {
>     String file = "file:///d:\\tomcat\\conf\\apps-ROOT.xml";
>
>     SAXReader reader = new SAXReader();
>     try {
>       Document document = reader.read(file);
>       Node node = document.selectSingleNode( "/webapps/Context" );
>       String name = node.valueOf( "@docBase" );
>       System.out.println(name);
>     } catch(DocumentException e) {}
>   }
> }
>
> ------------------ / ------------------
>
> When I run this class it keeps giving me the warning:
>
> Warning: Error occurred using JAXP to load a SAXParser. Will use
> Aelfred instead
>
> It just can't find my xerces parser!? Is something missing?
>
> Can someone please help me.
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to