Takes an html string fragment and converts it to a valid xml doc