diff --git a/src/ol/featureloader.js b/src/ol/featureloader.js index 08a7baf0a3..9c557c1d91 100644 --- a/src/ol/featureloader.js +++ b/src/ol/featureloader.js @@ -3,7 +3,6 @@ */ import {UNDEFINED} from './functions.js'; import FormatType from './format/FormatType.js'; -import {parse} from './xml.js'; /** @@ -48,7 +47,7 @@ export function loadFeaturesXhr(url, format, success, failure) { } else if (type == FormatType.XML) { source = xhr.responseXML; if (!source) { - source = parse(xhr.responseText); + source = new DOMParser().parseFromString(xhr.responseText, 'application/xml'); } } else if (type == FormatType.ARRAY_BUFFER) { source = /** @type {ArrayBuffer} */ (xhr.response);