Saving Java Object Graphs as XML file

前端 未结 15 2548
耶瑟儿~
耶瑟儿~ 2021-02-07 12:13

What\'s the simplest-to-use techonlogy available to save an arbitrary Java object graph as an XML file (and to be able to rehydrate the objects later)?

15条回答
  •  花落未央
    2021-02-07 12:45

    If you need to control the structure of the XML, the XStream is a good choice. You can use annotations to define precisely the structure/mapping of the XML and your objects.

提交回复
热议问题