Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <foo value1="a" value2="b">value3</foo>
- @XmlType(propOrder = {"value3"}, name = "foo")
- @XmlAccessorType(XmlAccessType.FIELD)
- public class Foo
- {
- @XmlAttribute
- private String value1;
- @XmlAttribute
- private String value2;
- @XmlElement(name = "")
- private String value3;
- }
- @XmlAccessorType(XmlAccessType.FIELD)
- public class Foo
- {
- @XmlAttribute
- private String value1;
- @XmlAttribute
- private String value2;
- @XmlValue
- private String value3;
- }
- If a class has @XmlElement property, it cannot have @XmlValue property
- @XmlRootElement(name="priceInclVat")
- @XmlAccessorType(XmlAccessType.FIELD)
- public class PriceInclVatInfo {
- @XmlAttribute
- private String currency;
- @XmlValue
- private String currencyCode;
- }
- <currencyCode plaintext="£">GBP</currencyCode>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement