
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
'xml2node' is simple XML parser for javascript allows you to parse XML into JS and access values/attributes easily.
It is licensed under MIT license.
https://riversun.github.io/xml2node/
clone this project and type
git clone https://github.com/riversun/xml2node.git
npm start
npm install xml2node
<?xml version="1.0" encoding="utf-8"?>
<opml version="2.0">
<head>
<title>Original Title</title>
</head>
<body>
<outline text="Greeting">
<outline text="We say good morning in the morning."/>
<outline text="We say hello at noon."/>
<outline text="We say good evening at night."/>
</outline>
<outline text="Thank">
<outline text="Thank you."/>
<outline text="Appreciate it."/>
</outline>
</body>
</opml>
You can access XML values/attributes like this.
var parser = new Xml2Node.Parser();
var jsObject = parser.parseXML(xmlText);
var node=new Xml2Node.Node(jsObject);
console.log(node.get("opml").attr("version")); // -> 2.0
console.log(node.get("opml").get("head").get("title").value()); // ->Original Title
console.log(node.get("opml").get("body").get("outline",0).attr("text")); // -> Greeting
console.log(node.get("opml").get("body").get("outline",0).get("outline",0).attr("text")); // -> We say good morning in the morning.
console.log(node.get("opml").get("body").get("outline",0).get("outline",1).attr("text")); // -> We say hello at noon.
console.log(node.get("opml").get("body").get("outline",0).get("outline",2).attr("text")); // -> We say good evening at night.
console.log(node.get("opml").get("body").get("outline",1).attr("text")); // -> Thank
console.log(node.get("opml").get("body").get("outline",1).get("outline",0).attr("text")); // -> Thank you.
console.log(node.get("opml").get("body").get("outline",1).get("outline",1).attr("text")); // -> Appreciate it.
FAQs
Simple and easy XML parser
The npm package xml2node receives a total of 5 weekly downloads. As such, xml2node popularity was classified as not popular.
We found that xml2node 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.