public static Properties parsePropsElement(Element propsEle) throws XMLParseException{
Properties props = new Properties();
List propEles = propsEle.elements(PROP_ELEMENT);
for (Iterator it = propEles.iterator(); it.hasNext();) {
Element propEle = (Element) it.next();
String key = propEle.attributeValue(KEY_ATTRIBUTE);
// Trim the text value to avoid unwanted whitespace
// caused by typical XML formatting.
String value = propEle.getTextTrim();
props.put(key, value);
}
return props;
}
XmlDataParser.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:easycode
作者:
评论列表
文章目录