From cb539bce984fc4715efa80d7a6210620c53ec102 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Thu, 1 Mar 2018 09:14:20 +0100 Subject: [PATCH] Untie feature loader and XML code --- src/ol/featureloader.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ol/featureloader.js b/src/ol/featureloader.js index 14411cf176..499367a325 100644 --- a/src/ol/featureloader.js +++ b/src/ol/featureloader.js @@ -3,7 +3,6 @@ */ import {nullFunction} from './index.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);