Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
This renders a simple javascript object structure into reasonably complicated xml/html. js objects are easier to modify than strings so no need to parse a whole dom to reliably add a few elements
This is a library designed to render js objects as xml. Its not made to parse or otherwise edit existing xml/html structures. For that and perhaps as a compliment to this you can use jsdom for editing existing markup.
Its real easy to make xml. I made this because i wanted to abstract away the fact that antiquated external systems require post data as xml and i wanted to expose a standard js calling api like my other interfaces. I did not want to instantiate an entire dom to perform simple updates to tags in lower level functions (like injecting api keys) when top level api call specific functions start building the xml string.
HOW TO INSTALL:
NPM:
npm install jsontoxml
Git:
git clone git://github.com/soldair/node-jsontoxml.git
HOW TO USE:
var jsonxml = require('jsonxml'); // if you "installed" with git // var jsonxml = require(path_to_jonxml+'/jsonxml');
jsonxml.obj_to_xml({ node:'text content', parent:[ {name:'taco',text:'beef taco',children:{salsa:'hot!'}}, {name:'taco',text:'fish taco',attrs:{mood:'sad'},children:[ {name:'salsa',text:'mild'}, 'hi', {name:'salsa',text:'weak',attrs:{type:2}} ]}, {name:'taco',attrs:'mood="party!"'} ], parent2:{ hi:'is a nice thing to say', node:'i am another not special child node' date:function(){ return (new Date())+''; } } })
outputs: // ! output is not tabbed this is an example
text content beef taco hot! fish taco mild hi weak is a nice thing to say i am another not special child node Sun Sep 26 2010 17:27:29 GMT-0700 (PDT)
FAQs
This is a library designed to render js objects as xml. Its not made to parse or otherwise edit existing xml/html structures.
The npm package jsontoxml receives a total of 17,547 weekly downloads. As such, jsontoxml popularity was classified as popular.
We found that jsontoxml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.