比如:
String xpath = "/dwr/allow/create[@javascript='" + fields+ "']";
3.读取web项目下的web-info目录下的文件new File("WebRoot\\WEB-INF\\dwr.xml");