i used this code,
  Configuration config = new Configuration();
            config.setLineNumbering(true);
     
           
            XPathEvaluator xpath = new XPathEvaluator(config);
            NodeInfo doca = xpath.setSource(new StreamSource((new File(xmlFileToLoad))));
            // String expression = "//artfront/artinfo/pubinfo/pubname";
            List list = xpath.evaluate("//*");
            for (int i=0; i<list.size(); i++) {
                NodeInfo element = (NodeInfo)list.get(i);
                System.out.println("Element " + element.getDisplayName() + " at line " + element.getLineNumber());
            }

it reads all the node and gives line number as -1 to all? :(:(
i dont know where i am going wrong..

On Sat, 08 Oct 2005 RamKumarDinesh Thillai wrote :
>
>which one to use for parsing a document?
>i used this
>System.setProperty("javax.xml.parsers.DocumentBuilderFactory","net.sf.saxon.dom.DocumentBuilderFactoryImpl");
>
>but still it has the problem.is there anyother way to use dom so that it can be done to get the line number?