Ana içeriğe geç

Example with no configuration

const XMLParser = require("fast-xml-parser/src/v5/XMLParser");
const parser = new XMLParser();
// xmlData'nızı kendiniz okuyun
let result = parser.parse(xmlData, true);
bilgi

The default output of the parse method is generated by the JsObjOutputBuilder. FXP v5 comes with two additional output builders. You can also set up your own custom output builder to customize the output.

const JsObjOutputBuilder = require("fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder");

const parser = new XMLParser({
OutputBuilder: new JsObjOutputBuilder()
});
// xmlData'nızı kendiniz okuyun
let result = parser.parse(xmlData, true);