Example usage for org.dom4j Element elements

List of usage examples for org.dom4j Element elements

Introduction

In this page you can find the example usage for org.dom4j Element elements.

Prototype

List<Element> elements();

Source Link

Document

Returns the elements contained in this element.

Usage

From source file:com.pureinfo.studio.db.xls2srm.impl.ProjectFinishImportRunner.java

License:Open Source License

private void beforeCopy(DolphinObject _newObj) {
    Element data = m_xmlConfig.element("data");
    Element beforeCopy = data.element("before-copy");
    if (beforeCopy == null)
        return;/*from w w  w  . jav  a 2s .  co m*/
    List properties = beforeCopy.elements();
    for (Iterator iter = properties.iterator(); iter.hasNext();) {
        Element element = (Element) iter.next();
        String sType = element.attributeValue("type");
        if ("int".equals(sType)) {
            _newObj.setProperty(element.attributeValue("name"),
                    Integer.parseInt(element.attributeValue("value")));
        } else {
            _newObj.setProperty(element.attributeValue("name"), element.attributeValue("value"));
        }
    }
}