Hi,

I find myself doing things like:

        private Map uris = new HashMap();
        uris.put("m",NAMESPACE);
        org.dom4j.XPath xpath = doc.createXPath("//m:what/m:ever");
        xpath.setNamespaceURIs(uris);
        org.dom4j.Node node = xpathSel.selectSingleNode(doc);

Instead of

        doc.selectSingleNode("//?:what/?:ever");

Because I know the namespace URI but not the prefix (which could be the default
prefix).

Is there an easier way to select a node using an xpath when I don't know the prefix?

-Tom





-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to