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

Reply via email to