New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kingdomjs

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kingdomjs

xml parser

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

kingdomjs (v-2.0.0)

Build Status

experimenting with DOM and reflection, alternative fro xml2json conversions.

I also happen to be an expat who sometimes would rather not use xpath.

Installation

npm install kindomjs --save

Usage

let KingDOM = require('kingdomjs');

let atomString = '<entry><id>someId</id><title type="text">some title</title></entry>';
let atomEntry = new KingDOM(atomString).entry[0];

console.log(atomEntry.id[0]['#text']);      // out : someId
console.log(atomEntry.title[0]['#text']);   // out : some title
console.log(atomEntry.title[0]['@type']);   // out : text


// serialize to string
console.log(atomEntry['@toString']);

Keywords

FAQs

Package last updated on 17 Mar 2016

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