I have the following xml snippet:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="reports">
<typeAlias alias="Header" type="VerificationVO"/>
</sqlMap>
在尝试使用以下方法解析此xml时:
def sqlMapOld = new XmlParser().parse(file)
I get the following error:
Exception thrown: Connection refused: connect
java.net.ConnectException: Connection refused: connect
如果我从xml片段中删除DOCTYPE,这个错误就会消失。有没有办法阻止groovy脚本尝试连接到URL?