✅ – 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>
<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`))
const parser = new XMLParser()

console.log(parser.parse(require`../tiled/${filePath}.tmx`))
S
ScriptyChris378d ago
@Rinkusu what's the output of
console.log(
'required tmx file:',
require`../tiled/${filePath}.tmx`
);
console.log(
'required tmx file:',
require`../tiled/${filePath}.tmx`
);
?
L
LaRynk378d ago
nvm I made a php script, thx anyway
UU
Unknown User378d ago