struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devon.bo...@ubs.com
Subject RE: xml is html in fourletter word format
Date Mon, 27 Aug 2001 07:57:48 GMT
> Sorry, had to to vent, been parsing/generating a lot of xml lately.
> The fact that xml has only three letters doesn't change my opinion!
> Have a good weekend folks.

Have you looked into JAXB? Given a DTD, it automatically generates
a collection of Java classes with getter/setter methods for each
tag name. You can then convert a valid XML document directly
into JavaBeans. And you can also convert the beans back to an XML
string.

JAXB has some limitations (it's also distributed only under a trial
license at the moment) but it's made dealing with XML completely
trivial in my case. Let JAXB create the bean, save it as an attribute
in scope, and let JSP present the data directly. And none of that
horrible DOM syntax.

Devon


Mime
View raw message