XPath - compound predicate + test if value does NOT start with something

I need help with some XPath. Say I am working on XHTML. How do I select all the a elements whose href attribute is NOT empty and does not begin with, say, 'mailto:'?


You can use the starts-with() function:

//a[@href != '' and not(starts-with(@href, 'mailto:'))]

Need Your Help

NSString to NSArray and editing every object

objective-c nsstring nsarray

I have an NSString filled with objects seperated by a comma

How to set environment variables for a shell command

command-line sh

I often see this command in node.js programs: NODE_ENV=test node app.js which sets the NODE_ENV variable to test and works. I also read here https://en.wikipedia.org/wiki/Environment_variable that ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.