http://radio.weblogs.com/0112098/
> - Original Message -
> From: "Steen Lehmann" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, October 28, 2002 8:31 AM
> Subject: Re: [Jaxen]
attr.getText() );
> }
>
> James
> ---
> http://radio.weblogs.com/0112098/
> - Original Message -
> From: "Steen Lehmann" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Mon
ogs.com/0112098/
- Original Message -
From: "Steen Lehmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 8:31 AM
Subject: Re: [Jaxen] XPath help...
Hmmm, just checked the spec and don't th
Hmmm, just checked the spec and don't think this would work. string() would have to be
wrapped around the expression: string(/A/@B) and this would just convert the first
node in /A/@B to a string. I don't see any functions in the spec which take a node
list as an argument and deliver anything el
> Next question. Using dom4j, when I do a selectNodes, I get by a list
> of org.dom4j.tree.DefaultAttribute objects. I'd like to have a list of
> String objects. Is this possible?
I think append a string() to the tail...
/A/B/string()
But, I could be wrong. Check the xpath spec f
Of David
Corbin
Sent: Sunday, October 27, 2002 5:58 PM
To: bob mcwhirter
Cc: [EMAIL PROTECTED]
Subject: Re: [Jaxen] XPath help...
bob mcwhirter wrote:
>On Sun, 27 Oct 2002, David Corbin wrote:
>
>
>
>>I've got an element X with two attributes, A & B. I want to identify
>&
bob mcwhirter wrote:
On Sun, 27 Oct 2002, David Corbin wrote:
I've got an element X with two attributes, A & B. I want to identify
the B attribute but only for elements that have an A value == 'foo'.
So, selectNodes shhould return "green" & "yellow".
I know that //X[@A='foo'] will ge
On Sun, 27 Oct 2002, David Corbin wrote:
> I've got an element X with two attributes, A & B. I want to identify
> the B attribute but only for elements that have an A value == 'foo'.
>
>
>
>
>
>
> So, selectNodes shhould return "green" & "yellow".
>
> I know that //X[@A='foo'] will get me
Hi David,
Should be as simple as //X[@A='foo']/@B.
Predicates (the expressions in square brackets) filter the nodes they
are applied to, so after @A='foo' has been evaluated you are left with X
elements whose B attributes you can select.
Regards,
Steen Lehmann
> -Original Message-
> Fr