On Sat, Mar 15, 2008 at 12:03 PM, Rob Heittman
<[EMAIL PROTECTED]> wrote:
>
> You can work with the DOM API directly.  DOM is a portable API that is a W3C
> standard, and pretty much the same in every language.  But it is not
> especially compact.  There is a simplified API, JDOM, which you might like
> better (www.jdom.org) but it is not a core part of the Java platform.  There
> are many sources on the Web that teach both the DOM and JDOM APIs, but here
> is the beginning of an implementation for your example document:

DOM is evil. It predates concepts like XML namespaces, and makes it
trivially easy to create ill-formed documents. Furthermore, its hard
implementation/interface split may seem elegant, but it stops you
taking a bit of XML from one source (i.e. the request) and attaching
it to another XML document created in a different factory.

see: http://www.artima.com/intv/xmlapis.html


- JDOM by Jason Hunter is nice, alll the data is also Serializalbe.
- Xom by Elliotte Rusty Harold is very elegant, and fairly extensible,
though ERH does have very strict ideas about what should and should
not be allowed. You have to get along with that.

I'm mostly a Xom fan myself. Were I to use restlet more, I'd end up
doing a Restlet/Xom binding to alongside my Xom-based SOAP stack.

-steve

Reply via email to