You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by JF1 <Je...@yahoo.co.uk> on 2007/04/19 12:51:34 UTC

Ant's approach to mapping XML to Java objects

I am unfamiliar with using Ant at this time, and was reading in the
documentation for Jeewiz, that they take Ant's approach to mapping XML to
Java objects. Does anyone have a link or a book recommendation that could
expand on this for the uninitiated?
Cheers
-- 
View this message in context: http://www.nabble.com/Ant%27s-approach-to-mapping-XML-to-Java-objects-tf3606348.html#a10075723
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Ant's approach to mapping XML to Java objects

Posted by Steve Loughran <st...@apache.org>.
JF1 wrote:
> I am unfamiliar with using Ant at this time, and was reading in the
> documentation for Jeewiz, that they take Ant's approach to mapping XML to
> Java objects. Does anyone have a link or a book recommendation that could
> expand on this for the uninitiated?
> Cheers

1. The forthcoming Ant in Action book will explain the O/X mapping in 
detail; there's some slides here

http://svn.apache.org/viewvc/ant/core/trunk/docs/slides/extending_ant.odp?view=co

2. look at the "writing your own task" bit of the ant docs for details 
on it.


It's not that complex, and is designed for one-way XML to O mapping. Any 
setter method in a class is an attribute, if Ant can convert a java 
string to the specific type. Elements and nested text are trickier.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org