Re: even easier XML parsing: Annotations?

Tatu Saloranta <[email protected]> Sun, 4 Dec 2005 10:26:30 -0800 (PST)
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
--- Reinier Zwitserloot <[email protected]> wrote:

> I was scanning the new annotations-based method for
> configuring hibernate, and then it hit 
> me: 'configuring' an xml parser in a similar vein
> shouldn't be too difficult.
> 
> I hacked an implementation together over the
> weekend.

Looks like a useful approach to me from a quick
glimpse?

On the other hand, there certainly is no shortage of
xml-to/from-java-objects data binding tools. ;-)
(although most probably are not using JDK 1.5 metadata
-- many are considering of making use of it, but it's
probably easier to start with using it as opposed to
bolting in support)
You may want to check out some of existing
alternatives to give some idea of how others have
approached it; the one that comes to mind first is
Xstream (http://xstream.codehaus.org), that focuses
mostly on object-to-xml-back-to-objects. Another
popular one is XmlBeans (http://xmlbeans.apache.org/),
but it focuses more on using xml schema for mapping
things. Dennis also has JiBX, and Sun obviously has
Jaxb... everyone has different ideas of what's the
best way to solve the mapping problem. ;-D

That said, using jdk metadata seems like a sensible
approach, and there's always room for improvements as
well as new solutions!

-+ Tatu +-



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/2U_rlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xmlpull-dev/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/