java解析xml,不使用第三方包

java解析xml,不使用第三方包

解决方法:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header/><soap:Body><ns2:sendMsgResponse xmlns:ns2="http://juchen.webservice.com/"><_return><entry><key>bat</key><value xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">19030816161728700000022</value></entry><entry><key>resp</key><value xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">0</value></entry></_return></ns2:sendMsgResponse></soap:Body></soap:Envelope>

解析xml,把entry标签中的key和value封装成map对象:http://www.yayihouse.com/yayishuwu/chapter/1808

猜你喜欢

转载自blog.csdn.net/qq_30908729/article/details/88353811