Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.87k stars 601 forks source link

How to use valueProcessors with Parser and parseStringPromise? #571

Open LiamKarlMitchell opened 4 years ago

LiamKarlMitchell commented 4 years ago
  var parser = new xml2js.Parser({
    trim: true,
    valueProcessors: [xml2js.processors.stripPrefix, xml2js.processors.parseNumbers, xml2js.processors.parseBooleans]
  })
  let result = await parser.parseStringPromise(xmlData)