Skip navigation.
 
mlRe: Basic XPath Question
FROM : Jens Alfke
DATE : Thu Apr 03 22:51:13 2008

On 3 Apr '08, at 1:40 PM, Mac QA wrote:

> Does the nodesForXPath:error: API in Cocoa just not support the
> features of XPath for matching nodes with specific attribute values?
> Or am I just doing something totally wrong? Any suggestions or
> pointers to examples would be greatly appreciated. Thanks!


That should all work. I just took a look at the Apple "NewMusic" 
sample, which uses XPath to scrape info out of eMusic's RSS feed 
entries, and it uses path expressions like
   //a[starts-with(@href,'http://www.emusic.com/artist/')]/@href
It's not exactly what you're doing, but it's definitely matching on 
attribute values. You might look at the sample code for clues.

—Jens

Related mailsAuthorDate
mlBasic XPath Question Mac QA Apr 3, 22:40
mlRe: Basic XPath Question Jens Alfke Apr 3, 22:51