• 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

xstream library problem

 
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem. I want to to save the JavaBean object to XML file:


Everything is OK to that point. The output file is created correctly and the aliases from annotations are set.

But, when I want to create the object from the same XML file:


I have the following exception:


Any ideas? I do not know what is wrong. Everything looks fine in the code.
 
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A close look at the generated could help. Let me guess: When parametrising the XML element names, one of the names you choose was "Parametry symulacji"? As white spaces are not allowed within XML identifiers the parser treats symulacji as a second identifier, which must be an attribute name at that position, but is not followed by a value.

Xstream should not allow faulty identifiers.
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Hauke.
That was the key!
 
reply
    Bookmark Topic Watch Topic
  • New Topic