Comment Comment by orestis In a browser context, the built-in DOMParser (perhaps wrapped in dompurify) is the way to do this. No need to look elsewhere. parent orestis 3 years ago