• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

customizing xmAdaptor in JAXB

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have hashtable which contains columnName and column value. My hashtable contains key,value pair as like

columnName= columnValue
columnName= columnValue
columnName= columnValue
columnName= columnValue

I would like to convert hashtable into xml by using xmlAdapter.

I was following the links


I see that we need to define the rootElement everywhere.either like @XmlRootElement(Name ="abc") or @XmlRootElement
public class abc{}

My xml should look like following.

i would like to know can we generate the xml with root tag as first 3 characters of columnname instead of class names or at the annotation level. Is it possible to generate xml from with custom root element name by using xmlAdapter?


    Bookmark Topic Watch Topic
  • New Topic