Scraping XML data with BS4 “lxml”
问题 Trying to solve problem very similar to this one: [Scraping XML element attributes with beautifulsoup I have the following code: from bs4 import BeautifulSoup import requests r = requests.get('https://www.usda.gov/oce/commodity/wasde/latest.xml') data = r.text soup = BeautifulSoup(data, "lxml") for ce in soup.find_all("Cell"): print(ce["cell_value1"]) The code runs without error but does not print any values to the terminal. I want to extract the "cell_value1" data noted above for the whole