spring - java使用HttpURLConnection发送一个请求,获得xml的返回值,如何解析
怪我咯
怪我咯 2017-04-18 10:50:35
0
5
978

和三方做对接,使用HttpURLConnection发送一个请求,获得一个xml的返回值,如何解析这个返回值,获得节点下面的值,还有就是如何生成一个xml字符串,发送请求的xml字符串是我用字符串拼接的,有没有更好的方法

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(5)
PHPzhong

There is a well-known XML parsing library on Java called Jdom. You need to study it.

伊谢尔伦

Just use the xml parsing tool to parse it

大家讲道理

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

黄舟

dom4j, necessary

洪涛

x-stream

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template