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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top