LaRynkL
Reactiflux3y ago
4 replies
LaRynk

✅ – Rinkusu – 14-53 Apr 4

Hi, I'm in vanilla JS and trying to use fast-xml-parser. I imported the script with a script tag:
    <scri
        integrity="sha512-XRps..."
        src="https://cdnjs.cloudflare.com/ajax/libs/fast-xml-parser/4.1.3/fxparser.min.js"
        crossorigin="anonymous"
        referrerpolicy="no-referrer"
    ></script>

But when trying to parse an actual xml file the output is an empty object. Any idea please ?
    const parser = new XMLParser()

    console.log(parser.parse(require`../tiled/${filePath}.tmx`))
Was this page helpful?