package main.week02.litestruts;
public class XmlDomUtil {
/*// 0 读取xml文档的元素值
// 获取工厂
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// 产生解析器
DocumentBuilder builder = factory.newDocumentBuilder();
// 解析xml文档,得到代表文档的document对象
Document document = builder.parse(new File(
"./src/main/week02/litestruts/struts.xml"));
// 根据标签名获取节点列表
NodeList actionList = document.getElementsByTagName("action");*/
/* HashMap<String, String> actionMap = new HashMap<String, String>();*/
/*for (int i = 0; i < actionList.getLength(); i++) {
// 获取节点列表里的节点
Element action = (Element) actionList.item(i);
// 获取节点的属性值
actionMap.put(action.getAttribute("name"),
action.getAttribute("class"));
}*/
}