Simple Java to XML example
Posted
by Tom Brito
on Stack Overflow
See other posts from Stack Overflow
or by Tom Brito
Published on 2010-05-19T16:49:19Z
Indexed on
2010/05/19
16:50 UTC
Read the original article
Hit count: 232
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)
© Stack Overflow or respective owner