Checking support...
Feature Not SupportedThis browser does not support the DOM Parser Web API feature. Try testing in a modern browser (such as Chrome, Edge, Safari, or Firefox).
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