test
success
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
package task;
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.JDOMException; import org.jdom2.input.SAXBuilder;
public class Parse2 { public static Element getRootElement(String file) { try { Document doc = new SAXBuilder().build(new File(file)); return doc.getRootElement(); } catch (JDOMException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; }
public static List getElementStringList(String nodeName,
Element root) {
List childList = root.g