Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Xerces question

 
Edward Morris
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I'm using Sun's Enterprise version of JAVA (which installs on c:\sun.....). I am trying to write a program to create and parse XML documents and when I do an import for org.apache...., eclipse cries! saying import cannot be resolved. I'm guessing I'll have to install this Apache Xerces parser, but I don't know how to do that. Can anybody help??
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably can make Eclipse happy by adding the xerces Jars to your project build path. Check the project build path in Eclipse. I don't have the J2EE SDK installed on this box, but my gut says that xerces jars are embedded in there somewhere. You just have to add them to the Eclipse project.

That said, you can download the xerces jars from apache.org and add them to your classpath. There is nothing complicated about this - just a zip file with a bunch of Jar files (and other stuff) in it. Unzipp and copy the jars.

- m
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you actually need to use the Xerces classes? Or do you just need to use Java to parse XML, and you're basing your code on an example that used Xerces? Normally to parse XML in Java (1.4 or later) you can just use the classes in the javax.xml.parsers package, and you don't have to download any parsers, Xerces or otherwise.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic