Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 625 Bytes

1. Getting Started.md

File metadata and controls

24 lines (16 loc) · 625 Bytes

Example with no configuration

const XMLParser = require("fast-xml-parser/v5/XMLParser")
const parser = new XMLParser();
//read xmlData your own 
let result = parser.parse(xmlData, true);

The default response of parse is built by JsObjOutputBuilder. FXP v5 comes with 2 more output builders. And you can set your custom output builder too to customize the output.

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

const parser = new XMLParser({
    OutputBuilder: new JsObjOutputBuilder()
});
//read xmlData your own 
let result = parser.parse(xmlData, true);