Trying to find a nice XML Bean with generic put functionality
Craig Burlock <[email protected]> Sun, 26 Aug 2012 12:58:13 +0930
| Newsgroups | gmane.text.xml.xmlbeans.user |
|---|---|
| Message-ID | <CAJEb=WO6kUYO3rDKY4iCdx8J_3x2q9MPdbf_ELKcjcDEdxacaQ@mail.gmail.com> |
Hello everyone!
Does anyone know of a bean / object with a "put" method that is designed to
be XMLizable using the key name and it's value object?
Something like this:
*BeanObject root = new BeanObject();
beanObject.put("name", "Joe Smith");
beanObject.put("gender", "Male");
beanObject.put("age", 22);*
...will produce this xml:
*<root>
<name>Joe Smith</name>
<gender>Male</gender>
<age>22</age>
</root>*
I'm certain I've used a Java Object that does this may moons ago.
The standard Java Map kinda works, but it produces excessive nodes and the
node names aren't based on the key.
I am wanting something generic because I would like to avoid creating new
classes just so my xml is clean...
Can anyone help me find the Object I am looking for (or is this my version
of Skittle-Brew)?