I can't say I've needed xmlbeans for this, but I've used free marker templates to do something similar based on map key/values. Would that work for you? -jacobd On Aug 25, 2012 8:29 PM, "Craig Burlock" <craig.burl...@gmail.com> wrote:
> 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)? > > >