JAXB ignores xml tag attribute
I read xml files with JAXB. I have the following structure
<A>
<B value="some string" />
</A>
I have the following model
@XmlRootElement
class A{
@XmlElement(name = "B", required = true)
@XmlPath("B/@value")
String b;
}
I read the tag value attribute B in my instance variable b.
But in some XML files, I have a B tag following the Structure. <#B/>
Although JAXB unmarshall files, I become the exception that the format is incorrect. javax.xml.stream.XMLStreamException: ParseError in [row, col]: [19,4]
+2