XML in JavaScript

Loading and Parsing XML in JavaScript

Browsers have parsed XML since the XMLHttpRequest era, when responseXML and jQuery 561 's $.ajax returned documents. Today the pattern is fetch() for the bytes and DOMParser for the tree, with no library. Both examples use BookNest's catalog and run in Chrome 154 1 .

Subsections


JavaScript Integration

JavaScript treats an XML document as a DOM tree, and can load, parse, query, transform, and serialize XML using built-in browser APIs or third-party libraries.

This section covers: