I need to unmarshall an XML that has namespaces for the attributes, for instance
<license license-type="open-access" xlink:href="http://creativecommons.org/licenses/by/2.0/uk/"><license-p>
This attribute is defined as
@XmlAttribute(namespace = "http://www.w3.org/TR/xlink/")
@XmlSchemaType(name = "anySimpleType")
protected String href;
But when I try to retrieve the href, it is null. What should I add/modify to the jaxb code in order to get the right value? I already tried to avoid namespaces but it did not work, still null. I also tried with @XmlAttribute(namespace = "http://www.w3.org/TR/xlink/", name = "href")
but it did not work either.
The top of the XML file is:
<DOCTYPE article
PUBLIC "-//NLM//DTD v3.0 20080202//EN" "archive.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" article-type="article">