in JAXB, if annotations were not provided, the element names will be derived from the property names not fields, but what about attributes in this case? is there any default behavior for writing out attributes back to the XML file?
in JAXB, if annotations were not provided, the element names will be derived from
Share
1) If annotations were not provided:
Every public getter/setter pair and every public field will be
automatically bound to XML, unless annotated by {@link XmlTransient}
For example
after
output is
2) What about XML attributes? XML attribute is named like field or getter/setter pair and placed in the root node
for example
output is