xml 字符串:
<diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <Region xmlns=""> <City diffgr:id="City1" msdata:rowOrder="0"> <CityID>832</CityID> <CityName>安国</CityName><CityName>深州</CityName></City> <City diffgr:id="City2" msdata:rowOrder="1"> <CityID>837</CityID> <CityName>安平</CityName></City></Region></diffgr:diffgram>
要转为json格式,用什么好的方法?
</diffgr:diffgram> 类似这种也可以只取其前缀:diffgr ,或是只取其后缀:diffgram
json 再转为 xml ?用正则表达式JAVA的XML与JSON互转,参考这篇:
http://www.iteye.com/topic/1058466 什么编程语言?