code.progysm.com

DOMParser

Type:
	Constructor

Example:
	const parser = new DOMParser();

Functions:
	parseFromString(string source, string mimetype) : XMLDocument|HTMLDocument

Examples:
	const parser = new DOMParser();
	const source = '<table><tr><td>test</td></tr></table>';
	const newDoc = parser.parseFromString(source, 'text/html');
	// newDoc is an HTMLDocument with html, head, body, table, tr, td.

Note:
	with "text/html", sending an <tr><td> structure without a <table> will strip down all <tr>, <td> since
	they need to be inside a <table> and not the <body>.
	See jsfiddle.net/npy6soju/