Not TestedTesting not done, may not work properly
DOM & HTML

DOM Parser

Parse XML or HTML string templates into DOM Document objects using DOMParser.

Checking support...
Advertisement

Interactive Input Workspace

Ready for input

Web API Execution Output

Result output will be displayed here after processing...

Native JavaScript Code Example (Zero Libraries)

const parser = new DOMParser();
const doc = parser.parseFromString('<div>Hello World</div>', 'text/html');
console.log(doc.body.firstChild.textContent);

About the DOM Parser Web API

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

Specification:W3C & WHATWG Web API Standard
Sponsored Content