Indeed the interaction with the inspector is great. Now could you still improve soup? What is your smalltalkhub account? Stef On Thu, Nov 9, 2017 at 11:12 AM, Siemen Baader <siemenbaader@gmail.com> wrote:
On Wed, Nov 8, 2017 at 10:45 PM, PBKResearch <peter@pbkresearch.co.uk> wrote:
Siemen
Stef should have added that XPath depends on using Monty's XMLParser suite. I tried your snippet on XMLDOMParser, and it parses correctly. I always use XMLHTMLParser for parsing HTML, because I can always see the exact relationship between the parsed structure and the original HTML. With Soup I often found the match difficult or even impossible.
Thanks Stef & Peter. I'm going with XMLHTMLParser, it is indeed nicer to work with in the inspector. I'm scraping my own html files (to create a mock DOM object of my HTML to work with in Pharo) so I think I will switch to xhtml too to reduce the complexity.
Nice chapter, I only saw it briefly before and didn't realize that XMLHTMLParser is a newer replacement for Soup.
-- Siemen