users@jaxb.java.net

JAXB beginner questions

From: joshua1970 <joshua1970j_at_libero.it>
Date: Tue, 3 Mar 2009 01:40:11 -0800 (PST)

Hi all !
I would like to use JAXB to marshal my Entity Beans into XML. For my needs
it's enough the use of @XmlRoot element and @XmlElement however I need to
change a few things in the XML produced: this is a piece of the class:

@XmlRootElement()
public class Task {

@XmlElement
getAccountProductId() {..}
@XmlElement
getActivityStatus() {..}
....

}

and this is the xml produced:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Task><accountProductId>16EX0M</accountProductId><activityStatus>READY</activityStatus></task>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Task><accountProductId>15EJ0M</accountProductId><activityStatus>ABORT</activityStatus></task>

I need to remove the <?xml > tag at the beginning and I would need to insert
all Task objects inside a wrapper tag like: <TaskList> ...</TaskList>
How can I do this if I have already set Task as root element?
thanks a lot
frank
-- 
View this message in context: http://www.nabble.com/JAXB-beginner-questions-tp22305335p22305335.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.