标签:
使用jdom解析xml字符串代码如下
String xml = "<root>......</root>"; SAXBuilder builder = new SAXBuilder(); Document doc = builder.build(xml);
运行时,抛异常java.net.MalformedURLException: no protocol......
解决办法如下:
String xml="<root>......</root>"; SAXBuilder builder = new SAXBuilder(); Document doc = builder.build(new ByteArrayInputStream(xml.getBytes()));
解析xml字符串出现java.net.MalformedURLException: no protocol的解决办法
标签:
原文地址:http://www.cnblogs.com/blackckat-hm/p/4243744.html