Sorry to drop in so late on this one. If all you want to do is pull out some info from an XML doc, why not use JDOM (www.jdom.org) to parse it? This gives nice easy access to all elements.
Steve. -----Original Message----- From: Tref Gare [mailto:[EMAIL PROTECTED]] Sent: 20 November 2002 09:24 To: Tomcat Users List Subject: RE: XML parser No need (and some would say 'bad idea') to place the jar explicitly in the classpath. Tomcat adds any dependent files to the classpath dynamically when it starts up and as such anything in your WEB-INF/lib folders is automatically available to JSP and Servlets. If on the other hand you were building standalone java apps you'd have to find a way (explicit or IDE Based) to get those jars onto the classpath. As that's not the case here (if I'm reading it right) there's no need to worry about it. Think of your WEB-INF/lib folder as an extension to the classpath. Cheers T ------------------------------------------------------ Tref Gare Development Consultant Areeba Level 19/114 William St, Melbourne VIC 3000 email: [EMAIL PROTECTED] phone: +61 3 9642 5553 fax: +61 3 9642 1335 website: http://www.areeba.com.au ------------------------------------------------------ "This email is intended only for the use of the individual or entity named above and contains information that is confidential. No confidentiality is waived or lost by any mis-transmission. If you received this correspondence in error, please notify the sender and immediately delete it from your system. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any communication directed to clients via this message is subject to our Agreement and relevant Project Schedule. Any information that is transmitted via email which may offend may have been sent without knowledge or the consent of Areeba." ------------------------------------------------------ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 20 November 2002 8:18 PM To: Tomcat Users List Subject: RE: XML parser >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 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>