Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
openrosa-xpath-evaluator
Advanced tools
Wrapper for browsers' XPath evaluator with added support for OpenRosa extensions.
Wrapper for browsers' XPath evaluator with added support for OpenRosa extensions.
For more info on extended XPath expressions/bindings supported by XForms/OpenRosa/OpenDataKit (ODK) see:
yarn add openrosa-xpath-evaluator
npm install --save openrosa-xpath-evaluator
const orxe = require('openrosa-xpath-evaluator');
const evaluate = orxe();
var result = evaluate(
'//ul/li/text()', // XPath expression
document, // context node
null, // namespace resolver
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE
);
// loop through results
for (var i = 0; i < result.snapshotLength; i++) {
var node = result.snapshotItem(i);
alert(node.nodeValue);
}
This library has no explicit dependencies, but expects various DOM & XPath-related values to be supplied by the browser (Element
, Node
, XPathResult
etc.).
To use the ODK digest()
function,
you'll need to add node-forge
to
your project.
$var
) are not supportedThe following XPath/ODK/OpenRosa functions are not implemented in this library, but may still work depending on your usage.
src/core
and src/openrosa
This library was developed by Medic Mobile for their Enketo-based application. In 2020, it was transferred to the Enketo organization. Many thanks to Medic Mobile for this very valuable contribution to the Enketo and ODK world.
Development of this application was made possible by:
FAQs
Wrapper for browsers' XPath evaluator with added support for OpenRosa extensions.
The npm package openrosa-xpath-evaluator receives a total of 568 weekly downloads. As such, openrosa-xpath-evaluator popularity was classified as not popular.
We found that openrosa-xpath-evaluator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.