Simple Java to XML example
- by Tom Brito
I've read a time ago about generate xml from Java using annotations, but I'm not finding a simple example now.
If I want to make a xml file like:
<x:element uid="asdf">value</x:element>
from my java class:
public class Element {
private String uid = "asdf";
}
Which annotations I should use to perform that? (I have a xml-schema, if this helps the generation)