DOMParser

open external class DOMParser(source)

Provides the ability to parse XML or HTML source code from a string into a DOM Document.

MDN Reference

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Parses string using either the HTML or XML parser, according to type, and returns the resulting Document. type can be "text/html" (which will invoke the HTML parser), or any of "text/xml", "application/xml", "application/xhtml+xml", or "image/svg+xml" (which will invoke the XML parser).