Apr-25-2017, 06:01 PM
(Apr-25-2017, 05:27 PM)kendias Wrote: I tried this and get error that it can't find tmp/test.xml file:Is
test.xml
in tmp
folder?You have not copy code right from wavic post post.
with open('/tmp/test.xml', 'r') as xml_file: xml_data = xml_file.read() soup = BeautifulSoup(xml_data, 'lxml') print(soup.gps.latitude.text)Here you also need to install lxml
pip install lxml