users@jaxb.java.net

how to unmarshall an xml file with attribute using annotation?

From: Matthew Huang <matthewhuang2004_at_gmail.com>
Date: Thu, 22 Feb 2007 12:41:06 -0800 (PST)

I got a xml file:
-----------------------------------------------------------
<RESULT>
    <ERRORS>
    </ERRORS>
    <WARNINGS>
      <WARNING externalId="A1" rowId="1">the warning message 1</WARNING>
      <WARNING externalId="A2" rowId="1">the warning message 2</WARNING>
      <WARNING externalId="A3" rowId="1">the warning message 3</WARNING>
    <WARNINGS>
<RESULT>
-----------------------------------------------------------
How do I code my Java Beans with annotation (e.g. @XmlElement) to do
unmarshalling (and latter marshalling)?

Another question is that the warning message can only be decided at runtime.
So basically I need to map warnings to be a java collection, sth like
List<warning>, how do I do this?

Thanks
-- 
View this message in context: http://www.nabble.com/how-to-unmarshall-an-xml-file-with-attribute-using-annotation--tf3275139.html#a9107890
Sent from the java.net - jaxb users mailing list archive at Nabble.com.