I have the following xml:
<?xml version="1.0" encoding="utf-8"?>
    <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.opengis.net/wfs/2.0 http://www.wfs.nrw.de/aaa-suite/schema/ogc/wfs/2.0/wfs.xsd" timeStamp="2023-06-01T13:31:53.444+02:00" numberReturned="0" numberMatched="9359426"/>

How can I extract the value of numberMatched using an xml parser like fast-xml-parser in NodeJS?

How to extract data from xml in NodeJS?
You need to set ignoreAttributes option to false
import { XMLParser } from "fast-xml-parser";

const XMLdata = `<?xml version="1.0" encoding="utf-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.opengis.net/wfs/2.0 http://www.wfs.nrw.de/aaa-suite/schema/ogc/wfs/2.0/wfs.xsd" timeStamp="2023-06-01T13:31:53.444+02:00" numberReturned="0" numberMatched="9359426"/>`;

const parser = new XMLParser({
  ignoreAttributes: false,
  attributeNamePrefix: ""
});
let jObj = parser.parse(XMLdata);

console.log(jObj["wfs:FeatureCollection"].numberMatched);


