Library for extracting XML from a string or DomDocument object