发起HTTP请求,返回xml参数,解析xml参数到实体。
引入依赖
1 | // https://mvnrepository.com/artifact/org.jdom/jdom2 |
解析方法
1 | /** |
解析示例
待解析数据
1 | <root><merCode>53540</merCode><beginDate>20220809093547</beginDate><endDate>20220823093547</endDate><resultCount>1</resultCount><pageIndex>1</pageIndex><pageSize>100</pageSize><resultCode>00</resultCode><finishTime>20220816213549</finishTime><list><orderNumber>1660623961459252231stb</orderNumber><orderNo>2604697751</orderNo><payType>null</payType><orderDate>2022-08-16 12:26:01</orderDate><orderAmount>0.04</orderAmount><bankNo>null</bankNo><channelNo>null</channelNo><orderStatus>1</orderStatus><gouduiStatus>1</gouduiStatus><refundStatus>0</refundStatus></list></root> |
解析后数据