/*读取header*/ HashMap xmlMap = new HashMap(); xmlMap.put("plugins","http://www.abc.com"); XPath x = configDOC.createXPath("/plugins:buyenvelop/plugins:header"); x.setNamespaceURIs(xmlMap); Element headElement = (Element)x.selectSingleNode(configDOC); if(headElement==null) { Exception e = new Exception("没有找到buyenvelop/header结点"); logFunction.error(e); } bf.append(headElement.getStringValue());
x = configDOC.createXPath("/plugins:buyenvelop/plugins:header/plugins:sellersingtype"); x.setNamespaceURIs(xmlMap); Element sellersingtypeNode = (Element)x.selectSingleNode(configDOC); if(sellersingtypeNode==null) { Exception e = new Exception("没有找到buyenvelop/header/sellersingtype结点"); logFunction.error(e);