// Path: webcrawler-downloader/src/main/java/com/zongtui/webcrawler/sourceer/xsoup/Xsoup.java
// public class Xsoup {
// 
//     /*-------------     XEvaluator         --------------- */
// 
//     public static XElements select(Element element, String xpathStr) {
//         return XPathParser.parse(xpathStr).evaluate(element);
//     }
// 
//     public static XElements select(String html, String xpathStr) {
//         return XPathParser.parse(xpathStr).evaluate(Jsoup.parse(html));
//     }
// 
//     public static XPathEvaluator compile(String xpathStr) {
//         return XPathParser.parse(xpathStr);
//     }
// 
//     /*-------------     W3cAdaptor         --------------- */
// 
//     public static org.w3c.dom.Element convertElement(Element element) {
//         return NodeAdaptors.getElement(element);
//     }
// 
//     public static org.w3c.dom.Document convertDocument(Document document) {
//         return NodeAdaptors.getDocument(document);
//     }
// 
// }
// 
// Path: webcrawler-downloader/src/main/java/com/zongtui/webcrawler/sourceer/xsoup/xevaluator/XPathEvaluator.java
// public interface XPathEvaluator {
// 
//     XElements evaluate(Element element);
// 
//     boolean hasAttribute();
// 
// }


import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.jsoup.nodes.Element;
import com.zongtui.webcrawler.sourceer.xsoup.Xsoup;
import com.zongtui.webcrawler.sourceer.xsoup.xevaluator.XPathEvaluator;

package com.zongtui.webcrawler.sourceer.selector;




/**
 * XPath selector based on Xsoup.<br>
 *
 * @author code4crafter@gmail.com <br>
 * @since 0.3.0
 */
public class XpathSelector extends BaseElementSelector {

    private XPathEvaluator xPathEvaluator;

    public XpathSelector(String xpathStr) {

// Path: webcrawler-downloader/src/main/java/com/zongtui/webcrawler/sourceer/xsoup/Xsoup.java
// public class Xsoup {
// 
//     /*-------------     XEvaluator         --------------- */
// 
//     public static XElements select(Element element, String xpathStr) {
//         return XPathParser.parse(xpathStr).evaluate(element);
//     }
// 
//     public static XElements select(String html, String xpathStr) {
//         return XPathParser.parse(xpathStr).evaluate(Jsoup.parse(html));
//     }
// 
//     public static XPathEvaluator compile(String xpathStr) {
//         return XPathParser.parse(xpathStr);
//     }
// 
//     /*-------------     W3cAdaptor         --------------- */
// 
//     public static org.w3c.dom.Element convertElement(Element element) {
//         return NodeAdaptors.getElement(element);
//     }
// 
//     public static org.w3c.dom.Document convertDocument(Document document) {
//         return NodeAdaptors.getDocument(document);
//     }
// 
// }
// 
// Path: webcrawler-downloader/src/main/java/com/zongtui/webcrawler/sourceer/xsoup/xevaluator/XPathEvaluator.java
// public interface XPathEvaluator {
// 
//     XElements evaluate(Element element);
// 
//     boolean hasAttribute();
// 
// }


// Path: webcrawler-downloader/src/main/java/com/zongtui/webcrawler/sourceer/selector/XpathSelector.java
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.jsoup.nodes.Element;
import com.zongtui.webcrawler.sourceer.xsoup.Xsoup;
import com.zongtui.webcrawler.sourceer.xsoup.xevaluator.XPathEvaluator;

package com.zongtui.webcrawler.sourceer.selector;




/**
 * XPath selector based on Xsoup.<br>
 *
 * @author code4crafter@gmail.com <br>
 * @since 0.3.0
 */
public class XpathSelector extends BaseElementSelector {

    private XPathEvaluator xPathEvaluator;

    public XpathSelector(String xpathStr) {

        this.xPathEvaluator = Xsoup.compile(xpathStr);
