import org.apache.xpath.XPathAPI;

import org.apache.xpath.XPathAPI;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import org.apache.xerces.dom.*;
import org.apache.xerces.parsers.*;

public class Test {
    public static void main(String[] args) {
        try {
            DOMParser parser = new DOMParser();
            InputSource is = new InputSource("file:///c:/Test.xml");
            parser.parse(is);
            Document doc = parser.getDocument();
            System.out.println(XPathAPI.selectSingleNode(doc, "/root/child1").getNodeName());
        } catch (Exception e){
            e.printStackTrace();
        }
    }
}
