和三方做对接,使用HttpURLConnection发送一个请求,获得一个xml的返回值,如何解析这个返回值,获得节点下面的值,还有就是如何生成一个xml字符串,发送请求的xml字符串是我用字符串拼接的,有没有更好的方法
PHPz2017-04-18 10:52:35
There is a well-known XML parsing library on Java called Jdom. You need to study it.
大家讲道理2017-04-18 10:52:35
The JDK has an API for processing XML, but it is not user-friendly. Recommend Dom4j, recommend a usage tutorial that I have watched before