How to parse <foo value1 = "a" value2 = "b"> value3 </foo> using JAXB?
The substring of my XML is as follows:
<foo value1="a" value2="b">value3</foo> I am trying to parse this with JAXB. I managed to parse the values โโof value1 and value2, but I had problems with the "root" value, since it does not have any tag associated with it.
My class:
@XmlType(propOrder = {"value3"}, name = "foo") @XmlAccessorType(XmlAccessType.FIELD) public class Foo { @XmlAttribute private String value1; @XmlAttribute private String value2; @XmlElement(name = "") private String value3; } Any ideas?
+6