Extensible Markup Language is a strict serialization of the Document Object Model:
https://developer.mozilla.org/en-US/docs/Web/XML
Using this browser api DOMParser() you can parsing xml uses a node system that is similar to parsing html:
https://developer.mozilla.org/en-US/docs/Web/API/XMLDocument
https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
Google: domparser example xml
https://stackoverflow.com/a/58279236/5283424