Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
MergeXML merges the XML sources (files, strings, objects) into single DOM XML object. The merging is performed recursively on the node level adding new elements and replacing existing ones. The nodes with the same path/name are replaced/added sequentially and the modification can be controlled by the options.
MergeXML could be useful in cases where it is necessary to gather XML data from multiple sources. For example, to join the configuration files of different subsystems depending on the system operation.
var MergeXML = require('mergexml');
MergeXML can included as a global script or with npm install mergexml --save
and loaded as shown above.
var oMX = new MergeXML([opts]);
opts - the options object:
oMX.AddFile(elem);
elem - FileList element of the XML file
oMX.AddSource(source);
source - XML string or DOM object
The methods merge a sequent source and return the final object or false if failed (see error property below).
You can search in the result object:
oMX.Query(expr);
expr - XPath query expression
You can get the XML result tree:
oMX.Get([0|1|2]);
The result object can be accessed also via oMX.dom property. The properties available:
The sources must have the same default namespace (if have at all). Prefix '_' is reserved to handle default namespace. IE doesn't allow replacement of the root node attributes.
The following files are included:
The MergeXML is realized also in PHP (see github.com).
To run the tests:
npm install
npm test
June 2015
October 2016 (Martijn van de Rijdt)
mergexml.js
cloning the namespaced attributes correctly
mixing sources of undeclared encoding
version 1.1.1
FAQs
Merge multiple XML sources
The npm package mergexml receives a total of 51,150 weekly downloads. As such, mergexml popularity was classified as popular.
We found that mergexml demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.