67,513
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="GB-2312" ?>
<xml>
<CateName ID="Subject1">
<CateName ID="Child1">
<Pro Name="one" Code="002"/>
<Pro Name="two" Code="002"/>
</CateName>
</CateName>
<CateName ID="Sbject2">
<Pro Name="three" Code="002"/>
</CateName>
</xml>
7 、xml to json
<a class="array">
<e type="function" params="i,j">
return matrix[i][j];
</e>
</a>
<a class="array">
<e type="function" params="i,j">
return matrix[i][j];
</e>
</a>
JSONArray json = (JSONArray) XMLSerializer.read( xml );
System.out.println( json );