>It's all a bit much isn't it.

You're not wrong!

OK, having continued to study the article you quoted, I have downloaded 
and installed the JWSDP (JAXP). In the same page that describes where to 
download JAXP it says:

"To install, unzip it in a directory of your choice, and update the 
classpath to include the three JAR files for JAXP: 

crimson.jar: the default XML parser, which was derived from the Java 
Project X parser from Sun 
xalan.jar: the default XSLT engine 
jaxp.jar: the APIs"

Here's the question (one of them for now), I want to use Xerces to parse 
my XML. Must I place the location of the Xerces JAR instead of 
'crimson.jar' in the classpath? If yes, will the same code in that page 
still apply? What modifications will have to be implemented? I suppose it 
is in the articles you reference below? I shall study the atricles 
mentioned after I have a lie down.

Regards

Paul. 

P.S DOM sounds like the way I want go





SAX is not a parser, it's more of a method that a parser would use.
There are essentially two ways to treat XML. 

DOM
..where a tree is built based on the XML file given and then traversed
back and forth to get stuff out of it. 

- And SAX 
..where an XML file is treated more like an object and can fire its own
events without having to be traversed/climbed like the DOM tree.

(please someone who actually knows something about this stuff correct
me).

As such you could use either of DOM or SAX methods to get the effect
you're looking for.  The difference between the two is basically that
DOM is a little easier conceptually (I think) and SAX is faster and more
OOP oriented.  If you're used to HTML then you're already working in a
DOM type environment and the conceptual leaps should not be so big.

Xerces can work in either of these modes.

http://www.devshed.com/Server_Side/XML/SAXandXerces/SAXandXerces2/print_
html

http://www.ecerami.com/xerces/

The latter article is a tad out of date as it mentions the xerces.jar
file which no longer comes with the package but the rest of it should
still be valid.  It may further clear up the quagmire.

Sorry I can't provide a clearer bit of example code but this lot should
help you down the path.


Alternatively.. check out the Jakarta standard taglibraries.  There's an
xml parsing taglib that may do just what you want

http://www.manning.com/bayern/appendixA.pdf
PDF manual for the taglibs


Reply via email to