JSFiddle - React, Tailwind, and code Playground
by Michael Prosser
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
JavaScript
$.getScript("https://geogratis.gc.ca/services/elevation/cdem/profile?path=LINESTRING(-72.5%2045.25,%20-71.5%2045.75,%20-71.5%2045.75)",function(response,status){
alert(status);
parser = new DOMParser();
xmlDoc = parser.parseFromString(response,"text/xml");
alert("ELEVATION = " + xmlDoc.getElementsByTagName("elevations")[0].childNodes[0].nodeValue);
});