Socket
Socket
Sign inDemoInstall

superagent-xml2jsparser

Package Overview
Dependencies
3
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    superagent-xml2jsparser

an xml to jason parser for superagent


Version published
Weekly downloads
168
decreased by-8.7%
Maintainers
1
Install size
268 kB
Created
Weekly downloads
 

Readme

Source

superagent-xml2jsparser

a parser for visionmedia/superagent that converts XML to json. It uses xml2js

Installation

with npm

npm install superagent-xml2jsparser

Motivation

I needed to access an XML based API with superagent. This seemed the simplest thing to do

Usage

request = require('superagent');
xml2jsParser = require('superagent-xml2jsparser');

request
    .get('http://api.openweathermap.org/data/2.5/weather?q=Los Angeles&mode=xml')
    .accept('xml')
    .parse(xml2jsParser) // add the parser function
    .end(function(err, res){
        console.log(res.body)
    })

Keywords

FAQs

Last updated on 14 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