Troubleshooting

Using Sun's XML Libraries

Q1:Why can't the Java compiler find the XML libraries?
Make sure that jaxp.jar is in your classpath.
Q2:My program compiles okay; why does it tell me it can't find the parser library?
The parser library is in jaxp.jar, but the parser implementation is in a separate JAR file. Depending on the release of the parser, the file may be called parser.jar or crimson.jar. You can also use the Xerces parser from Apache with Sun's libraries.

DOM Problems

Q1:Why do I keep getting ClassCastException when I loop through the children of an element?
The NodeList class is a list of node objects, and even though you might expect all the nodes to be one particular type (like Element), it's possible that there are other nodes. ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.