users@jaxb.java.net

How to unmashal the xml to a sub class?

From: James Mao <james.mao_at_iona.com>
Date: Fri, 07 Sep 2007 18:17:45 +0800

Hi,

I have a xml file

<meta xmlns="http://foo.com">
<uid>abc</uid>
</meta>


I have Meta.java which is generated by Jaxb2

I also have a SubMeta which extends the Meta, but it's a POJO, without
any jaxb annotation, and is created manually

public class SubMeta extends Meta {
    int foo;
    // getter/setter ...
}


Is it possible to unmarshal the xml file to generate the object of the
SubMeta? and How?


Thanks in advance
James