Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;

import org.w3c.dom.Node;

public class Main {
    public static String eval(Node doc, String xpath_url) throws XPathExpressionException {
        XPathFactory xpathFactory = XPathFactory.newInstance();
        return xpathFactory.newXPath().compile(xpath_url).evaluate(doc);
    }
}