【发布时间】:2011-11-29 07:33:18
【问题描述】:
我正在尝试将 xml 解析为 java 类,任何人都可以帮助我。 谢谢。
<?xml version="1.0" encoding="utf-8"?>
<patterns>
<pattern if="menuCondition">
<input>Menu</input>
<output>
<command if="taxCondition">Company</command>
<command>Tax</command>
<command>Customer</command>
<command>Vendor</command>
<command>Banking</command>
<command>Reports</command>
<command>Settings</command>
<command>Logout</command>
</output>
</pattern>
</patterns>
【问题讨论】:
-
粘贴您目前拥有的解析代码并提出具体问题。
-
如果您使用的是 xstream,请查看xstream.codehaus.org 的教程以开始使用。