Example usage for org.dom4j Node selectNodes

List of usage examples for org.dom4j Node selectNodes

Introduction

In this page you can find the example usage for org.dom4j Node selectNodes.

Prototype

List<Node> selectNodes(String xpathExpression, String comparisonXPathExpression);

Source Link

Document

selectNodes evaluates an XPath expression then sorts the results using a secondary XPath expression Returns a sorted List of Node instances.

Usage

From source file:edu.scripps.fl.pubchem.PubChemFactory.java

License:Apache License

public int populateAssaysFromSummaryDocument(Session session, Node document) throws Exception {
    List<Node> list = document.selectNodes("/eSummaryResult/DocumentSummarySet", ".");
    for (Node node : list) {
        Integer id = Integer.parseInt(node.selectSingleNode("AID").getText());
        PCAssay assay = getAssay(session, id);
        populateAssayFromSummaryDocument(assay, node);
        session.save(assay);/*w w w  .j a v  a  2 s. c o m*/
    }
    return list.size();
}