XSD to Java, specify to use a Java HashMap

后端 未结 1 1215
清歌不尽
清歌不尽 2021-01-14 04:16

I am trying to generate some Java class from XSD schema. I know exactly what I want to generate in Java, and I\'m trying to write the corresponding XSD schema.

I nee

相关标签:
1条回答
  • 2021-01-14 05:05

    Yes, maps are handled seamlessly by jaxb, but only in one way.

    The solution is described here:

    http://todayguesswhat.blogspot.co.uk/2012/09/jaxb-xsd-to-java-maphashmap-example.html

    But it is a lot of hassle if you already have a class that maps correctly. Why do you want to regenerate it from XSD?

    0 讨论(0)
提交回复
热议问题