3 Jun 2009

XPath notepad ('like' queries)

Nothing fancy in this post, I just don't want to forget how to do 'like' queries in xpath

XPath: //category[@name='abc']
is equivalent to
Sql: select * from category where name ='abc'

XPath: //category[contains(@name, 'abc')]
is equivalent to
Sql: select * from category where name like '%abc%'

1 comment:

Anonymous said...

Sweet, thanks for the post, this is exactly what I was looking for.