Speechify interview question

The question concerned parsing nodes in an HTML document, given specific rules.