user974061
user974061

Reputation: 363

Google Sheets XML path returns no data

Using the following in Google Sheets:

IMPORTXML("http://www.fishingnotes.com/fishing-report/al/Lake-Purdy","//div[1]/div[1]/div[1]/div[2]/span[2]")

I should receive the result:

41° (What's This) but instead Google says Imported Content is Empty

What am I doing wrong?

Upvotes: 0

Views: 96

Answers (2)

Aurielle Perlmann
Aurielle Perlmann

Reputation: 5509

Actually this xpath: //tr[3]/td/text() will be the simplest way to get the degrees:

=IMPORTXML("http://www.fishingnotes.com/fishing-report/al/Lake-Purdy","//tr[3]/td/text()")

Upvotes: 0

Ed Nelson
Ed Nelson

Reputation: 10259

Use this:

=index(IMPORTXML("http://www.fishingnotes.com/fishing-report/al/Lake-
Purdy","//span[2][@id='atemp']"),1,1)

It will return 41°

Or use

=IMPORTXML("http://www.fishingnotes.com/fishing-report/al/Lake-
Purdy","//span[2][@id='atemp']")

to return 41° (What's This)

Upvotes: 1

Related Questions