Parser HTML/XML strings into DOM-like trees