• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

XMLEncoders vs SAX/DOM

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've to create XML files for back-end processing and most of the content is added in it at run-time.If SAX/DOM is used, then this XML file has to be created manually. Also, to retrieve a particular value, whole document need to be parsed. If I use XMLEncoders and Decoders, then this file saving and retrieval is handled automatically. But the problem is that these Encoders and Decoders show a very random behaviour. They save few properties and few not(apart from default). Also at times, they show a exception "discarding statement XMLEncoder.writeObject(e);"
Is there any way out to solve this problem.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand the bit about XMLEncoder showing random behaviour - surely this is all defined in terms of the JavaBean specs - how can it be random?
When I have to do this sort of thing I just code the XML creation as print statements - that way you have total control.
Bill
reply
    Bookmark Topic Watch Topic
  • New Topic