If you are not familiar with a lot of XML-related APIs, the easiest approach is to use the SAX API, in my opinion*.
You may be the first person I've ever encountered who finds SAX the easiest way to process XML!
* There are higher level APIs that might suit you better, depending on what you are doing. Struts and Commons Validator use some sort of higher-level "config" library, if I'm not mistaken, that is designed for constructing objects/Maps out of config files, so you might have a look at the source code for one or both of those. I'm sure someone else could on the list could better inform you about this.
This is commons-digester, and it does in fact make it extremely simple to read XML and produce objects from it, especially if you have the liberty of defining the XML syntax before you write the processing code. Digester really helped me get my design oriented towards decent externalization of configuration elements. I now prefer the Spring Framework's bean factory, because it standardizes what I normally use Digester for without needing to write even XML processing rules.
Since I started using Digester (and then Spring), I have not had much cause to deal with XML in the DOM form directly, although I would think that for most newcomers, the tree model is more straightforward than SAX's event model. If you do need to do something with DOM, it's probably worth checking out dom4j or JDOM, two apis that simplify the DOM and provide a more Java-like API.
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]