This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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??
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.
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.