
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
Checking XML syntax of files using pegjs grammar, pretty print XML files and concert XML into JSON
Validating the syntax of a xml text
xmlChecker.js (and xmlCheckerModule.js) is PEG.js grammar to validate a string against the XML syntax. xmlChecker.js doesn't validate the string against a XSD schema. xmlChecker.js can used to check a file on the fly, e.g. while editing the file in a web browser at development time.
xmlPrettifier.js (and xmlPrettifierModule.js) converts a string in the XML format to a prettified version of the string in XML.
xml2json.js (and xml2jsonModule.js) converts a string in the xml format to a json data structure using the same grammar as the xmlChecker.js .
Just include the xmlChecker.js in your client code
<script src="/js/xmlChecker.js"/>
or import the module in node.js using npm install xmlChecker
var xmlChecker = require('xmlChecker');
and use it
try
xmlChecker.check(source)
catch error
alert("XML Parser: " + error.name + " at " + error.line + "," + error.column + ": " + error.message);
For more examples see the code in examples.
Just to use the library copy the file xmlChecker.js to your preferred location.
To modify the grammar you need to install PEG.js by
npm install pegjs
and compile it, e.g. using
./pegjs.sh
FAQs
Checking XML syntax of files using pegjs grammar, pretty print XML files and concert XML into JSON
The npm package xmlchecker receives a total of 521 weekly downloads. As such, xmlchecker popularity was classified as not popular.
We found that xmlchecker 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.