File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes xstream library problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xstream library problem" Watch "xstream library problem" New topic

xstream library problem

Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 808

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.

Hauke Ingmar Schmidt

Joined: Nov 18, 2008
Posts: 436
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

Joined: Apr 20, 2009
Posts: 808

Thank you, Hauke.
That was the key!
I agree. Here's the link:
subject: xstream library problem
It's not a secret anymore!