xStream crashes when there are more fields in the XML

Flippy

New Member
xStreamWhen I have the following XML code:\[code\]<xml> <version>1.1</version> <url>http://www.google.nl</url></xml>\[/code\]And I read this with my Java code everything works fine, but when the XML changes, for example to:\[code\]<xml> <test>test</test> <version>1.1</version> <url>http://www.google.nl</url></xml>\[/code\]I get an error, but I want that the program doesn't stop, and don't use the field test. Is there a way to handle this exception without that the program stops?\[code\]Exception in thread "main" com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldExce ption: No such field Version.iets---- Debugging information ----field : ietsclass : Versionrequired-type : Versionconverter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverterpath : /Version/ietsline number : 1version : null-------------------------------\[/code\]
 
Back
Top