getting Dynamic attribute for element in Jaxb

前端 未结 2 522
既然无缘
既然无缘 2020-12-20 23:23

I have the following XML tag with many attributes. The number/name of the attributes is not given because I am getting the XML in runtime and I just know the name of the tag

2条回答
  •  心在旅途
    2020-12-21 00:01

    You can do:

    @XmlAnyAttribute
    private Map attributes;
    

    Almost the Map that you wanted.

提交回复
热议问题