+0100
| > From: Jan Dvorak <[EMAIL PROTECTED]>
| > To: Tom Oehser <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
| > Subject: Re: [dom4j-dev] selecting nodes when URI is known but prefix is
| > not
| >
| > Hi,
| >
| > XPath matching doesn't care about prefices in t
> 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
Dvorak wrote:
> Date: Fri, 1 Nov 2002 09:13:43 +0100
> From: Jan Dvorak <[EMAIL PROTECTED]>
> To: Tom Oehser <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: Re: [dom4j-dev] selecting nodes when URI is known but prefix is
> not
>
> Hi,
>
> XPath matching
Hi,
XPath matching doesn't care about prefices in the instance document searched.
Although possible, it's by no means straightforward to write an XPath that
matches a particular prefix.
Beware: The prefix you use in writing your XPath expressions has no
relationship whatsoever to the prefix of
t for namespace-uri and just
test on the local name, but it still won't win any beauty contests.
-- Steen
> -Original Message-
> From: Tom Oehser [mailto:tom@;toms.net]
> Sent: 31. oktober 2002 17:05
> To: [EMAIL PROTECTED]
> Subject: [dom4j-dev] selecting nodes when
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