Parses document according to HTML5 sectioning model and prints tree