Re: [Jaxen] XPath help...

2002-10-28 Thread Steen Lehmann
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]

Re: [Jaxen] XPath help...

2002-10-28 Thread bob mcwhirter
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

Re: [Jaxen] XPath help...

2002-10-28 Thread James Strachan
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

Re: [Jaxen] XPath help...

2002-10-28 Thread Steen Lehmann
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

Re: [Jaxen] XPath help...

2002-10-27 Thread bob mcwhirter
> 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

RE: [Jaxen] XPath help...

2002-10-27 Thread Ryan Tomayko
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 >&

Re: [Jaxen] XPath help...

2002-10-27 Thread David Corbin
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

Re: [Jaxen] XPath help...

2002-10-27 Thread bob mcwhirter
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

RE: [Jaxen] XPath help...

2002-10-27 Thread Steen Lehmann
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