Selecting two attributes

T

Tascien

Can i do an xpth like this?

..//Field[@ID='Email' AND @Value='(e-mail address removed)']

what is the correct way? this one fails... I need to select a node
that satisify both conditions...

T.
 
?

=?ISO-8859-1?Q?R=E9mi_Peyronnet?=

.//Field[@ID='Email' AND @Value='(e-mail address removed)']

//Field[@ID='Email'][@Value='(e-mail address removed)']

Should do it

Hth
 
K

Keith Davies

Can i do an xpth like this?

.//Field[@ID='Email' AND @Value='(e-mail address removed)']

what is the correct way? this one fails... I need to select a node
that satisify both conditions...

off the top of my head:

.//Field[@ID='Email' and @Value='(e-mail address removed)']
.//Field[@ID='Email'][@Value='(e-mail address removed)']

"and" is an operator. "AND" is not.


Keith
 
T

Tascien

Thanks everyone...

this drove me nuts yesterday...

i guess this should work too:

..//Field[@ID='Email' or @Value='(e-mail address removed)']



Keith Davies said:
Can i do an xpth like this?

.//Field[@ID='Email' AND @Value='(e-mail address removed)']

what is the correct way? this one fails... I need to select a node
that satisify both conditions...

off the top of my head:

.//Field[@ID='Email' and @Value='(e-mail address removed)']
.//Field[@ID='Email'][@Value='(e-mail address removed)']

"and" is an operator. "AND" is not.


Keith
 
R

Robin Johnson

Thanks everyone...

this drove me nuts yesterday...

i guess this should work too:

.//Field[@ID='Email' or @Value='(e-mail address removed)']

No. That'll select Field elements with ID attribute equl to "Email",
OR with Value attribute equal to "(e-mail address removed)", OR with both.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top