XmlDataParser.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:easycode 作者:
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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号