> That is, if I'm reading documents of the form //?:a/?:b/?:c, and I
> know that ? is bound to http://x.y.z, but I _don't_ know for sure
> what the prefix will be, what is the best way to select Node z given
> a document object?
>
> What I have been doing is
>
> > | 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);
>
> What I really want is something like:
>
> doc.selectSingleNode("//my:a/my:b/my:c","my","http://x.y.z");
What I mean is, what I would want is:
doc.selectSingleNode("//my:a/my:b/my:c", uris);
So that I could set up a Map with all of the URIs that I know are going
to be in use, and then tell the XPath processing to bind those, without
doing it the long way every time.
-Tom
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev