<productInfo>
<product>
<productPrice>
<price></price>
</productPrice>
</product>
<productInfo>
To create an XML like the above I am creating classes for productInfo, product, productPrice and then I am "unmarshalling" using JAXB annotations.
Is there any way to unmarshall without creating product class?
Note: I'm the EclipseLink JAXB (MOXy) lead and a member of the JAXB (JSR-222) expert group.
You could use the
@XmlPathextension in the MOXy implementation of JAXB to map this use case.For More Information