Hi,
    I use xstream to read and write xml file in my project, and I encounter a 
problem. In the project, there's an xml configuration file, but it is used by 
two  programs.  The other program may add some unknown tags which are the tags 
of xml file that don't have the corresponding class defined in my java program, 
but they are useful in the other program. The aim is to reserve‍ these strange 
tags when the classes are wrote back to xml file. It means the strange tags 
should be wrote back, though I don't need them in my program. I have learnt 
your tutorials online and many blogs. Now I can discard these unknown tags, so 
there will not be any exceptions when the xstream encounter unknown tags, but 
when it is wrote back, these tags don't appear in the xml file any more.‍
   I want to ask whether there is a method that it can reserve these unknow 
tags (the tags of xml file that don't have the corresponding class defined in 
my java program‍) in the xml file after my java program read the file and write 
back.


   Thanks. Waiting for your reply.


Best regards!
miccio
  ‍

Reply via email to