You need to use a different method and supply the class you expect.
Sukumar Gaade wrote:Hi,
I am unmarshalling an xml using JAXB 2.0 as below:
If the input xml is invalid it shows the exception message saying:
This exception says that the name element is not expected which is fine. If this is the case then i need to the parent node of the element where the exception occurred and should perform some business logic. I am not able to get the parent node. I tried this:
but, I get null. How do i get the parent node?
Could anyone please help me out.
Thanks,
Suku