File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Trouble Using Apache Xerces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Trouble Using Apache Xerces" Watch "Trouble Using Apache Xerces" New topic

Trouble Using Apache Xerces

Sean McGaughey

Joined: Jul 20, 2003
Posts: 11
Hi all,
I have just started an XML tutorial and I am trying to compile an example on using the DOMParser class. However I get a "package org.apache.xerces.parsers does not exist" when I try to import the package:
import org.apache.xerces.parsers.DOMParser;
and a "cannot resolve symbol" error when I try to create a new DOMParser:
DOMParser parser = new DOMParser();
After trying ggogle for a few hours the best I could find was to add "xercesImpl.jar" and "xmlParserAPIs.jar" to my classpath setting which I have done a number of times and restarted the machine each time - no luck. I definitely have the and accompanying files under the following directory structure:
What do I need to do to make this work? Do I need to change my import statement or move the xerces folder from "extras" into the main jdk1.4/src/org/apache folder? I am truly stuck on this and would greatly appreciate any help.
Thanks in advance,
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
We have a forum specifically for XML and related products. I will move this post for you.

Matthew Phillips
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Ok. And I'll move it to IDEs because the problem is how to add Xerces into the project's classpath in JBuilder 9

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: Trouble Using Apache Xerces
It's not a secret anymore!