
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
saxo-parser
Advanced tools
SaxoParser is a helper to configure a sax parser using a self descriptive configuration object.
npm i -S saxo-parser
var SaxoParser = require('saxo-parser');
var saxo = new SaxoParser({
myTag : {
_open: function(tag) {
tag.data = {};
tag.data.someProp = tag.attributes.someProp;
tag.data.moreProps = [];
},
_close: function(tag) {
// do something with tag.data
console.log(JSON.stringify(tag.data));
},
mySubTag : {
_close: function(tag) {
tag.parent.data.moreProps.push(tag.text);
}
}
}
});
saxo.parseString('<root><myTag someProp="someValue"><mySubTag>Some</mySubTag><mySubTag>Text</mySubTag></myTag></root>');
The constructor function takes an object describing what function should be called when parsing each xml element.
The entries of the object can be either a tag element name or a special function _open
, _text
(matches both text and cdata nodes) or _close
. None of the special method is mandatory and should be used depending of the object to be parsed.
The parser can then parse a string with parseString
, an inputStream with parseStream
or a file with parseFile
[1.1.0] - 2022-04-12
FAQs
A friendly way to configure a SAX parser
The npm package saxo-parser receives a total of 20 weekly downloads. As such, saxo-parser popularity was classified as not popular.
We found that saxo-parser 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.