Hi John,

welcome .. :-). Yes, that combination is a nice one. Before trying to
address your questions re: mapping, let me ask you one (important)
question first. As you have XML schemas anyhow, why bother writing a
mapping (file) at all ? Surely you could use the Castor XML code
generator and generate Java (and descriptor) classes from your XML
schema, and simply use them with Spring OXM.

If that's not an option to you, I'd liek to know why.

Regards
Werner

john guthrie wrote:
> hi, came to castor by way of spring OXM and it looks like (exactly) what i
> need.
> 
> i am trying to use castor to map my current XML schema to my current data
> model and am stuck trying to figure out how to map some of an elements
> attributes to a child object of the, er, current object. an example would
> be...
> 
> XML:
> <event type="FOO" created_by="user1"/>
> 
> Java
> 
> public class Event {
> 
>   public Metadata metadata; // = new Metadata();
> 
>   public String type;
> 
> }
> 
> public class Metadata {
> 
>   public String createdBy;
> 
> }
> 
> 
> i don't think i can use a set-method of getMetadata().setCreatedBy() even if
> i uncomment the initializer. do i need to write a handler?
> 
> thanks.
> 
> john
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to