Socket
Socket
Sign inDemoInstall

express-xml-parser

Package Overview
Dependencies
8
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-xml-parser

express middleware to parse xml body using type-is, raw-body, xml2js


Version published
Weekly downloads
48
decreased by-50%
Maintainers
1
Install size
388 kB
Created
Weekly downloads
 

Readme

Source

express-xml-parser

NPM version Build Status

  • use type-is to check whether a xml request
  • use raw-body to get decoded text body from request
  • and xml2js to parse to json

Usage

===

var options = {
  // options will apply to is-type
  type: ['xml'],    //default [ 'xml' ]

  // options will apply to raw-body
  limit: '1mb',     //default 100kb,
  encoding: 'utf8'  //default utf8,

  // options will apply to xml2js
  trim: false
};
app.use(xmlBodyParser(options));
app.post('/xml', function(req, res) {
  // req.body is a xml-json
});

Keywords

FAQs

Last updated on 18 May 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc