Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Xerces question  RSS feed

 
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: 22681
43
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
Boost this thread!