XPath String Value Comparisons

M

Martin Honnen

Nishad said:
Is anybody know how to write xpath for string Value Comparisons

"string1" = "string2"
"string1" != "string2"
are string comparisons in XPath 1.0.

I am not sure that helps but your short question does not make it clear
to me what you are looking for exactly.
 
D

Dimitre Novatchev

Nishad said:
Is anybody know how to write xpath for string Value Comparisons

thank you

In XPath 1.0 the only comparisons between strings can be performed using the
"=" or "!=" operators

or the

not(str1 = str2)

expression.

It is possible to perform comparison for greater, less, and the various
combinations of these with "not" and "equal" using XSLT.

See for example:

http://www.topxml.com/code/default.asp?p=3&id=v20010205033413


Cheers,
Dimitre Novatchev
 

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

Forum statistics

Threads
474,006
Messages
2,570,265
Members
46,860
Latest member
JeremiahCo

Latest Threads

Top