I tried this and get error that it can't find tmp/test.xml file:
Thanks snippsat - works fine.
from bs4 import BeautifulSoup open('/tmp/test.xml', 'r') xml_data = xml_file.read() soup = BeautifulSoup(xml_data, 'lxml') print(soup.gps.latitude.text)
Thanks snippsat - works fine.