Skip to content

Commit

Permalink
Remove xmldom (geosolutions-it#10044)
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz authored Mar 11, 2024
1 parent 286af3c commit c8e50d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@
"webfontloader": "1.6.28",
"wellknown": "0.5.0",
"xml2js": "0.4.17",
"xmldom": "0.3.0",
"xpath": "0.0.27"
},
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions web/client/epics/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import * as Rx from 'rxjs';
import axios from 'axios';
import xpathlib from 'xpath';
import { DOMParser } from 'xmldom';
import {head, get, find, isArray, isString, isObject, keys, toPairs, merge, castArray} from 'lodash';

import {
Expand Down Expand Up @@ -467,7 +466,9 @@ export default (API) => ({

const metadataFlow = Rx.Observable.defer(() => axios.get(metadataUrl, {headers: {'Accept': 'application/xml'}}))
.pluck('data')
.map(metadataXml => new DOMParser().parseFromString(metadataXml))
.map(metadataXml => {
return (new DOMParser()).parseFromString(metadataXml, "text/xml");
})
.map(metadataDoc => {
const selectXpath = xpathlib.useNamespaces(metadataOptions.xmlNamespaces || {});

Expand Down

0 comments on commit c8e50d0

Please sign in to comment.