How to set xml annotations dynamically?

Deadly 提交于 2020-02-25 08:42:05

问题


So I've got a big excel sheet that has a bunch of labels with values attached to them, think Party_Name being the label with "IBM" being the value in that specific cell. I've read them all into a HashMap, with the key being the label and the value being the value of the cell (both of type String). Thing is, I want to be able to bind each as a XML tag so that it'll display in a web browser when I point it to the specific path of a Party. Is it possible to set these xml element dynamically because it'd a pain to statically make the 100+ tags? Oh, I've previously been using JAXB as well. So what I want is something like this

<Party_Name> IBM </Party_Name>
<id> 123456 </id>
...etc

来源:https://stackoverflow.com/questions/17435929/how-to-set-xml-annotations-dynamically

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!