Nageswar, Jaya wrote:
Hi David,
Can you please give an example/ code snippet for implementing
PrefixResolver and using it with.XpathEvaluator. It will be a great help
to me.
Please don't send postings to my private email address -- that's what the
mailing list is for.
I don't generall
Nageswar, Jaya wrote:
Hi Dave,
Thanks for the reply. Do you mean to say that we need to give
prefix to the default namespace in the input xml file? Is that what you
mean by mapping a prefix to the default namespace?
Is there anyway with out modifying my input xml file?
If you read m
>Do you mean to say that we need to give
>prefix to the default namespace in the input xml file?
No, the input XML has already assigned the elements to a namespace.
In a path expression, the element names must be assigned to that
same namespace in order to match. But in an XPath 1.0 expression,
yo
-
From: David Bertoni [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 09, 2007 10:40 PM
To: xalan-c-users@xml.apache.org
Subject: Re: xpath expression with namespace
Nageswar, Jaya wrote:
> Hi Dave,
>
> If I have namespace like xmlns:ns = "http://."; in my xmal file
> (
Nageswar, Jaya wrote:
Hi Dave,
If I have namespace like xmlns:ns = "http://."; in my xmal file
(sample.xml) then I can use the xpath expression as you suggested
("//ns:message").
Yes, because you are using the root element as the prefix resolver. Note
this technique won't work if the names
space_node);
But my question is how do we need to give xpath expression if we have
default namespace(xmlsns="http://).
-Original Message-
From: David Bertoni [mailto:[EMAIL PROTECTED]
Sent: Monday, October 08, 2007 11:47 PM
To: xalan-c-users@xml.apache.org
Subject: Re: xpath
Nageswar, Jaya wrote:
Whenever I have a default namespace in my xml file, xpath expression is
not returning any nodeset.
..
I am trying to use xpath expression as “//message”. My code is as
follows. I am using xerces as well as xalan in my application.
..
Since I have default namespa
You must define a prefix for your default namespace (for exemple with a
XalanNamespacesStack). XPath expression can't be apply to a default
namespace.
Nageswar, Jaya a écrit :
Whenever I have a default namespace in my xml file, xpath expression is
not returning any nodeset.
I have my xml