Selecting two attributes

tascien

Usenet Archive
Joined
Nov 7, 2003
Messages
21
Reaction score
0
Can i do an xpth like this?

..//Field[@ID='Email' AND @Value='']

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

T.
 

Keith Davies

Usenet Archive
Joined
Oct 26, 2003
Messages
37
Reaction score
0
Can i do an xpth like this?

.//Field[@ID='Email' AND @Value='']

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='']
.//Field[@ID='Email'][@Value='']

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

Keith
 

tascien

Usenet Archive
Joined
Nov 7, 2003
Messages
21
Reaction score
0
Thanks everyone...

this drove me nuts yesterday...

i guess this should work too:

..//Field[@ID='Email' or @Value='']

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

.//Field[@ID='Email' AND @Value='']

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='']
.//Field[@ID='Email'][@Value='']

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

Keith
 

Robin Johnson

Usenet Archive
Joined
Oct 26, 2000
Messages
25
Reaction score
0
Thanks everyone...

this drove me nuts yesterday...

i guess this should work too:

.//Field[@ID='Email' or @Value='']

No. That'll select Field elements with ID attribute equl to "Email", OR with Value attribute equal to "", 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
548,208
Messages
3,104,802
Members
249,594
Latest member
henrywalsh

Latest Threads

Top