Maven
<!-- 解析xml文件 --> <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <version>2.1</version> <classifier>jdk15</classifier> </dependency>
<dependency> <groupId>xom</groupId> <artifactId>xom</artifactId> <version>1.2.5</version> </dependency>
Java
XMLSerializer xmlSerializer = new XMLSerializer(); JSON json = xmlSerializer.read(xml); JSONObject jsonObject = JSONObject.parseObject(json.toString()); jsonObject = JSONObject.parseObject(jsonObject.getString("soap:Body")); JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("xx_Result"));