dom4j怎么获得指定名称的节点信息
1个回答
展开全部
String xml ="...";
Document doc = DocumentHelper.parseText(xml);
Element root = doc.getRootElement();
Element db_config = root.element("db_config");
Element db_driver = db_config.element("db_driver");
String val_db_driver= db_driver.getTextTrim();
Document doc = DocumentHelper.parseText(xml);
Element root = doc.getRootElement();
Element db_config = root.element("db_config");
Element db_driver = db_config.element("db_driver");
String val_db_driver= db_driver.getTextTrim();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询