Exclude certain elements with an xpath query -


i'm using xpath extract elements following url:

http://gizmodo.com/how-often-cities-appear-in-books-from-the-past-200-year-1040700553

to extract main content, i'm using query:

//p[@class='has-media media-640'] 

however, i'd exclude spans within main content have class "magnifier lightbox". i've looked through stackoverflow , tried sorts of methods such as:

//div[@class='row post-content']/*[not(self::span[@class='magnifier lightbox'])] 

to no avail.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -