Need a serializer in xml files. I do not know which one to use. I need as simple as possible to work and not XStream.

In general, you will need to implement both class serialization and deserialization.

Different parsers are not needed - you need a ready serializer.

It is necessary that the serialization should be performed in such a way that the xml file contains something like this: http://www.solarix.ru/pix/faind/datamining/xml_file_example.gif

Accordingly, deserialization should work with the same file.

  • for what purpose? why not json? - Gorets
  • just need to serialize the class in xml - Stas0n
  • And what XStream did not suit? He used them and JAXB, did not feel much of a difference, in the end, the principles are the same. - Aleksei Chibisov pm

1 answer 1

How about JAXB , part of the JDK since version 1.6 it seems. Pretty easy to use.

  • And it turns out to make the serialized class in the xml file look like this: solarix.ru/pix/faind/datamining/xml_file_example.gif - Stas0n
  • 3
    I don't see any problems - Mage
  • Yeah, I found a couple of good examples ... very simple - thanks a lot !!! Can you recommend something else? Well, just to compare .. - Stas0n
  • Well, for example dom4j.sourceforge.net - Mage
  • So this is a parser, and I need a serializer .. - Stas0n