# re: xstream 解析xml 别名 注解 list集合 boolean 数组 converter Pom.xml设置 回复 更多评论
2013-03-27 17:30 by
<list>
<string>CALCULATE</string>
<string>caihongcheng</string>
<int>10</int>
<boolean-array>
<boolean>true</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
</boolean-array>
</list>
一开始有一个boolean类型的数组,我把它添加到一个list里面,想通过xstream遍历成xml。(源代码:
ArrayList list = new ArrayList();
list.add("CALCULATE");
list.add("caihongcheng");
list.add(10);
list.add(status);//status为boolean数组
)
求大神给写段代码让上面的数组变成下面那样的,可以把代码发给我邮箱:513110286@qq.com,不胜感谢!
<response>
<command>CALCULATE</command>
<parkName>caihongcheng</parkName>
<picNumber>20</picNumber>
<picValue>true</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
<picValue>false</picValue>
</response>