• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XmlBeans and Java Objects

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a number of Java Objects which I need to convert to XmlBeans. I am using Castor to marshall the Java Objects to a String and am using the parse method on XmlBeans to create the XmlBean object. The String produced as a result of Castor mapping is correct for creating an XmlBean (with a bit of tweaking) but the problem is that the fields are not in the correct sequence and the XmlBean is therefore not valid. I presume I could get round this by specifically mapping every field in a castor mapping file in the correct order, but there are hundreds of Java Objects, and I was hoping to take advantage of the auto complete feature as much as possible.

I'm basically looking for any suggestions as to how I can create an XmlBean from a Java Object without having to go down specifying each individual field in order, either using the way I describe or something else.

All the best.
 
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic