Java CDATA XML Help
Go to solution
Solved by mackncheesiest,
I'm not incredibly experienced with JAXB, but I believe you may be looking for the @XmlAttribute annotation. I think one solution might be something like
@XmlRootElement(name = "Style") public class Style { @XmlElement(name = "IconStyle") private IconStyle iconStyle; @XmlAttribute(name = "id") private String id; ... }
I believe that should add an XML attribute to the Style tag (which if I'm interpreting your problem right is what you're looking for), and as long as JAXB's marshalling then properly marshalls the IconStyle tag, I think you'll be good. Also see https://stackoverflow.com/a/7498378
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now