Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!gv8g2000vbb.googlegroups.com!not-for-mail From: Stefanie Ertheld Newsgroups: comp.lang.java.programmer Subject: [Jaxb] Date: Wed, 22 Jun 2011 13:08:17 -0700 (PDT) Organization: http://groups.google.com Lines: 63 Message-ID: <7c49f151-0f1b-4e5c-936d-ce42e8261c55@gv8g2000vbb.googlegroups.com> NNTP-Posting-Host: 95.91.6.219 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1308773766 32461 127.0.0.1 (22 Jun 2011 20:16:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 22 Jun 2011 20:16:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: gv8g2000vbb.googlegroups.com; posting-host=95.91.6.219; posting-account=7WjHKwkAAACYARGd4NwwOEu2-005tc5a User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5548 Hi, I've got an xml document like this: Peter Meyer Betty Boo How can that be mapped to jaxb annotations? I've tried all sorts of things, like: @XmlRootElement(name = "employees") @XmlAccessorType(XmlAccessType.FIELD) public class Employees { @XmlAttribute(name = "id") private String id; @XmlAttribute(name = "room") private String room; @XmlElement(name = "employee") @XmlElementWrapper(name = "employees") private Employee[] employees; [...] However, this doesn't work. There is a problem with the employees Element. On Google I found various examples of the type: Peter Meyer Betty Boo This works easily - however when the document root element is also at the same time a list, I can't get it to work. Any ideas? Thanks in advance, Stefanie