How to unmarshal xml without mapping the root xml element?

后端 未结 3 1372
一生所求
一生所求 2021-01-15 23:11

I want to unmarshal a xml file containing a collection of data, like this

 
      Jim
      Tom<         


        
3条回答
  •  我在风中等你
    2021-01-15 23:40

    JAXB:

    • Iterate over subelements of the incoming XML (DOM, SAX, StAX - whatever API suits you best)
    • unmarshaller.unmarshal(node, Person.class)

    There are also advanced techniques with programmaticaly created mappings.

提交回复
热议问题