日期:2014-05-17 浏览次数:20737 次
SAXBuilder sb=new SAXBuilder(); URL cl = Client.class.getClassLoader().getResource(""); base = cl.getPath(); base = str_trim(base,"/"); base = base.replace("classes", ""); doc = sb.build(new FileInputStream( base + "client.xml")); root = doc.getRootElement();
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/2002/xmlspec/dtd/2.10/xmlspec.dtd"> <clients> <client name="win32fan" key="8273f9a4830487d0fd67eefa1f05423e"></client> </clients>