Decompose the BuildDOMTree with IgnoredTags into smaller methods.