Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xmlparser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmlparser

an xml2json package for nodejs

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.3K
increased by8.72%
Maintainers
1
Weekly downloads
 
Created
Source

XMLPARSER

xmlparser 是一个基于NodeJs的封装组件,主要是用来解决XML转JSON格式的问题.

使用方法:

安装:

$ npm install xmlparser

使用:

var xml2json = require("xmlparser");
var xml      = "";
var json     = xml2json.parser( xml );
console.log( json );

优化:

在原著基础上进行了优化,解决了以下问题:
1、节点中存在CDATA被过滤的问题;
2、空值被处理为对象、其余数据均为字符串的问题;
3、增加代码注释,增加代码注释,方便日后各位优化;
4、节点的多属性支持。
5、去掉了内置的DEBUG和不做节点解析的部分(对我用处不大,所以被优化掉了)。

###版权 原作者: Thomas Frank
优  化: yhostc

Keywords

FAQs

Package last updated on 01 Sep 2012

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc