英文:
Reading and creating xml like xsd
问题
我对处理类似的 XML 不太熟悉。我的任务是读取这个 XML,包括读取属性(例如 xdms:type)和标签值(例如 xdms:organization)。还有一个相反的问题:创建完全相同的 XML。请告诉我在 Java 中我可以学习并用来解决这个问题的技术。
<?xml version="1.0" encoding="windows-1251"?>
<xdms:communication xdms:version="2.7" xmlns:xdms="http://www.someLink.com/OAHS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xdms:header xdms:type="某种类型" xdms:uid="SDGDS65G46D54GD"
xdms:created="2020-01-02T17:05:20">
<xdms:source xdms:uid="dfsd4f5sd46fd64sd6f56sd">
<xdms:organization>我的机构</xdms:organization>
</xdms:source>
</xdms:header>
<xdms:container>
<xdms:body>某些内容</xdms:body>
</xdms:container>
</xdms:communication>
英文:
I am new to working with similar xml. My task: read this xml, including reading attributes (e.g. xdms: type) and tag values (e.g. xdms: organization). And the inverse problem: create exactly the same xml. Tell me technologies in java that I could learn and with which I could solve my problem.
<?xml version="1.0" encoding="windows-1251"?>
<xdms:communication xdms:version="2.7" xmlns:xdms="http://www.someLink.com/OAHS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xdms:header xdms:type="Some type" xdms:uid="SDGDS65G46D54GD"
xdms:created="2020-01-02T17:05:20">
<xdms:source xdms:uid="dfsd4f5sd46fd64sd6f56sd">
<xdms:organization>My Organization</xdms:organization>
</xdms:source>
</xdms:header>
<xdms:container>
<xdms:body>Some body</xdms:body>
</xdms:container>
</xdms:communication>
专注分享java语言的经验与见解,让所有开发者获益!
评论