What is best practice in converting XML to Java object?

后端 未结 10 890
没有蜡笔的小新
没有蜡笔的小新 2021-02-13 16:02

I need to convert XML data to Java objects. What would be best practice to convert this XML data to object?

Idea is to fetch data via a web service (it doesn\'t use WSDL

10条回答
  •  终归单人心
    2021-02-13 16:35

    Another option is a Sax Parser. It is procedural - i.e. a visitor pattern - but if the xml is fairly lightweight, (and even medium weight) I have found it to be very useful for this.

提交回复
热议问题