How to Parse XML
In this article, we'll explain about XML parsing. We'll start by defining XML files, their format and how to navigate them for data extraction.
To reverse expression in XPath the not()
function can be used which reverses any expression passed to it.
This is useful for creative negative predicates that are vital in many HTML parsing tasks. See this interactive example:
Above, we can use not()
function to filter out special HTML elements like advertisements.
This knowledgebase is provided by Scrapfly — a web scraping API that allows you to scrape any website without getting blocked and implements a dozens of other web scraping conveniences. Check us out 👇