[英]dumb xml-file with unique tags (Java)
I have a .xml file with this kind of tag: "tag_X" and "sub_tagY". 我有一个带有这种标记的.xml文件:“ tag_X”和“ sub_tagY”。 Like this: 像这样:
<tag_1>
<sub_tag1>
<key>something here</key>
</sub_tag1>
<tag_1>
<tag_2>
<sub_tag1>
<key>something here</key>
</sub_tag1>
<sub_tag2>
<key>something here</key>
</sub_tag2>
<tag_2>
<tag_3>
<sub_tag1>
<key>something here</key>
</sub_tag1>
<tag_3>
I started using DOM but this is not working properly... Can anyone help me to read it in Java? 我开始使用DOM,但无法正常工作...有人可以帮我用Java读取它吗? Thanks!! 谢谢!!
You can use the xstream
library. 您可以使用xstream
库。 More details about XStream Docs 有关XStream Docs的更多详细信息
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.