users@jaxb.java.net

jaxb2-reflection library help

From: Hunor Bartha <hunor.bartha_at_ambo.ro>
Date: Mon, 28 May 2007 13:50:51 +0300

Hello everybody,

I am trying to use the jaxb2-reflection library to dynamically read
information about jaxb objects. Could somebody please post some short
example how to obtain the name of the xml element(node) to which a given
jaxb object is bound to. I would be interested in the value of the
/name/ property of the @XmlElement annotation. It seemed
straightforward at the beginning, but by now i am completely lost
between the different RuntimeClass* interfaces and implementations.
For example, if i have the class:

public class Parent{
    @XmlElement(name = "Node1", required = true)
    protected *Node1Type* node;
}

and at runtime i have an instance of *Node1Type*, how could i obtain the
"Node1" string from it?

Thanks in advance.

Regards,
-- 
Hunor