Question

I am currently getting started with XML and Java. The author says that I will need DOM, SAX, JAXP and JDOM to work with the examples given.

The book states that DOM and SAX come bundled with a parser of your choice, in my case Xerses-J. I have downloaded Xerses-J (xerses-1_4_4) jar file.

so Question 1 : If I want to get started with XML and Java in Eclipse, I will only have to add the jar file xerses.jar to the build path?

Moving on to JAXP, the book says that JAXP comes with most parsers, not all. So, I want to know if it comes with Xerses-J. If not, what do I need to do?

Now, finally for JDOM. The book says that JDOM comes as a separate bundle. I downloaded it. I just need to include jdom.jar file in the build, again, right ?

I know the questions are silly but, yeah those are the questions :)

Was it helpful?

Solution

Xerces has been bundled with the JDK since (1.4?). There's no need to download and include its JAR's in project that uses a current version of the JDK. This covers you for SAX, DOM and JAXP, though you will need to download the JDOM JAR's and include them in your classpath.

On a side note, consider using Maven to manage your dependencies, it trivializes the task.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top