Hello,
I am using feedparser for parsing from XML file.But I couldn't parse <geo:lat>
, <geo:long>
tags using feedparser from that file! Do you people have any idea how I can parse those tags using feedparser in python?
Thanks in advance!
Hello,
I am using feedparser for parsing from XML file.But I couldn't parse <geo:lat>
, <geo:long>
tags using feedparser from that file! Do you people have any idea how I can parse those tags using feedparser in python?
Thanks in advance!
Feedparser should parse Basic Geo namespace with extension name geo without problem.
Check that your XML has http://www.w3.org/2003/01/geo/wgs84_pos# namespace declaration like:
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
This snippet should work:
import feedparser
d = feedparser.parse('http://yourfeed.xml')
print d.entries[0].['geo_lat']
print d.entries[0].['geo_long']