Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a specification string or the string could not be parsed.
build的URL路径中有中文字符可能不支持
看看能不能设置encoding来解决
build的URL路径中有中文字符可能不支持
看看能不能设置encoding来解决
调试欢乐多
我的xml是这样的
<?xml version="1.0" encoding="UTF-8" ?>
- <NewDataSet xmlns="xmlns://www.fortifysoftware.com/schema/fvdl">
- <FVDL xmlns="xmlns://www.fortifysoftware.com/schema/fvdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6" xsi:type="FVDL">
<CreatedTS date="2008-08-24" time="10:41:13" />
- <Build xmlns="xmlns://www.fortifysoftware.com/schema/fvdl">
<BuildID>Sample1</BuildID>
<NumberFiles>1</NumberFiles>
<ScanTime value="6" />
</Build>
我现在想获得BuildID的内容(Sample1)上面程序如何改
我是这样的没打印
SAXBuilder sb = new SAXBuilder();
try {
Document doc=sb.build("G:\\Sample1.xml");
Element root=doc.getRootElement();
List l=root.getChildren("FVDL");
for(int i=0;i<l.size();i++){
Element e=(Element) l.get(i);
System.out.print(e.getChild("//BuildID").getText())