if i have a node that i got and i need to get where it actually locates?how is this possible with the same by using Configuration or else i have to follow some other format
for eg.
xml file is
      <pubname>dddd s</pubname>

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        InputSource inputSrc = new InputSource(new FileInputStream(new File(xmlFileToLoad)));
        Document xmlDoc = builder.parse(inputSrc);
            NodeList dd=xmlDoc.getElementsByTagName("pubnum");
            Node dd1=dd.item(0);
NodeInfo nodeInfo = (NodeInfo)dd1.getFirstChild();
        System.out.println(nodeInfo.getLineNumber()); // will this return the value 4.

it is not giving me..
the one u told for xpath also i tried but it is returning 0 i think bcauz it is having the whole document in the nodeinfo it is retunrning 0.

Configuration config = new Configuration();            config.setLineNumbering(true);
XPathEvaluator xpath = new XPathEvaluator(config);         
NodeInfo doc = xpath.setSource(new StreamSource((new File xmlFileToLoad))));

System.out.println("The Line Number "+doc.getLineNumber());

what could be wrong in my code..?