All of you intersted in using XML object mapping as well UI building with XML may be interested in the Swang project. or Swang is reflective, and very powerful. It provides a plugguble modular TagHandler mechanism, and a very flexible schema. One example of the modularity of Swang is that the popular BeanShell scripting language is included as a TagHandler in the distribution. The beans shell script has access to the objects created with Swang, and vice versa. The means that you can use natural Java notation, and complex expressions. My comany uses Swang to provided rich UIs to applications that used to be just HTML. Now thanks to JSP and XSL, we can provide any Java based UI along with the HTML version. Swang also takes some of the worry out of handling things like threads, and thread safe changing of object properties by allowing you to mark methods to be invoked using SwingUitilities.invokeLater() just by setting the attribute 'later' to true. Check it out. I am really looking for advice on future versions, and am looking to other projects for synergy and community effort. Forgive me that the example is not very full of features, but it does give a good idea of the power. Also there is some documentation, certainly enough to get started, but I am working on making it much better. The source code is not large, and pretty simple to follow. WR Russ White --- Qwerty Poiu wrote:

Hey Matt and all,

I think a xml to object mapper that doesn't need any config filoes like Digester is worthwile, and I would love to try it out.  I like Digester and JAXB, JAXme, etc, but I still think these are not the end of the story.
I want to use such an engine in conjuction with a few Schema and transformation languages to create forms in java and HTML, but what I really am interested in is the Design Patterns behind all this, and considering as many points of view as possible is really boradening my horizons.

Tim C.

>From: Matt Pickering
>Subject: Using XML to create Java objects
>Date: Tue, 29 Oct 2002 21:37:19 -0800 (PST)
>Hello all,
>I use XML on a daily basis in my day job and recently
>I've started work on some gaming projects that use XML
>to store configuration and game data. One of the most
>tedious tasks I've had to deal with in both realms is
>the parsing of XML in order to create Java objects,
>both simple and complex.
>I know libraries and tools exist to do this, but they
>all have one major drawback: they require me to write
>code to describe the objects I want to create and map
>the XML to them.
>I've written an engine that allows me to express
>simple and composite Java objects as XML and have Java
>objects come out without any work on my part other
>than providing a listener to capture the objects as
>they are created.
>The engine uses Java Reflection to construct objects
>and call methods. Methods can accept simple
>parameters or other objects, which can also be
>expressed as nested XML.
>The XML markup has to follow a few simple rules and a
>mechanism is provided to allow the user to define
>constants that can substitute one value for another as
>well as define the tags that map to various objects.
>Here is a simple example of some XML markup that
>creates a Java Properties object:
> >xmlns:twgp="">
> >class="java.util.Properties"/>
>I've been using this engine to built game
>configuration files as well as to build config files
>for some rules-based code I use in my day job.
>My question to the list is this: Would there be any
>interest to the community at large in such an engine?
>I was planning to release the engine along with the
>gaming code, but it is being maintained as a separate
>codebase. I am willing to break the engine out and
>maintain it as a separate project if there is
>sufficient interest.
>The engine is general purpose but is scoped for
>applications that use XML as configuration data but
>don't want the hassle of having to parse the XML to
>suit differing requirements. It is not a
>serialization mechanism (although I plan to add a
>converter to take instantiated objects and dump out
>compatible XML markup). It certainly isn't a "be-all,
>end-all" solution to the problem of XML-Java
>conversion, but can address a decent amount of the
>problems that an average developer may face in using
>XML and Java.
>If anyone would like to know more, please reply to the
>list or me directly. If this ins't the appropriate
>forum for this, I do apologize and I will repost this
>to the Jakarta list and take my chances there.
>Matt Pickering
>Do you Yahoo!?
>HotJobs - Search new jobs daily now
>In case of troubles, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Unlimited Internet access for only $21.95/month. Try MSN! Click Here --------------------------------------------------------------------- In case of troubles, e-mail: To unsubscribe, e-mail: For additional commands, e-mail: __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now --------------------------------------------------------------------- In case of troubles, e-mail: To unsubscribe, e-mail: For additional commands, e-mail: