All modern browsers have a built-in XML parser.
Parse an XML Document
The following code fragment parses an XML document into an XML DOM object:
Parse an XML String
The following code fragment parses an XML string into an XML DOM object:
Note: Internet Explorer uses the loadXML() method to parse an XML string, while other browsers use the DOMParser object.
Access Across Domains
For security reasons, modern browsers do not allow access across domains.
This means, that both the web page and the XML file it tries to load, must be located on the same server.
The XML DOM
In the next chapter you will learn how to access and retrieve data from the XML DOM object.