XPath for accessing Flickr’s popular tags

9 May

I was finally able my parsing of my Flickr-based project to use XPath instead of iterating through nests of XML elements to get at the daily, weekly and all-time popular tags on Flickr’s most popular tags page.

These are the XPath tags for getting to the <a> elements on Flickr’s most popular tags page

// The all-time most popular tags
String xpAllTime = "//p[@id='TagCloud']/a";

// Daily (24 hours) popular tags
String xpDaily = "//table[@id='Recently']/tr/td[1]/p//a";

// Weekly popular tags
String xpWeekly = "//table[@id='Recently']/tr/td[last()]/p//a";
Advertisements

One Response to “XPath for accessing Flickr’s popular tags”

  1. BEENA November 20, 2010 at 1:16 am #

    good

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: