This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

sdmxmllib

0.7.3 • Public • Published

sdmxmllib

Build Status current version License

Experimental Javascript client library for mapping SDMX-ML 2.1 structure messages.

This library contains functions for mapping SDMX-ML 2.1 structure messages to Javascript objects. Library is used for prototyping the SDMX-JSON Structure message and supports a limited number of structures (with more to come):

  • Codelist
  • Concept Scheme
  • Agency Scheme
  • Dataflow
  • Category Scheme
  • Categorisation
  • Hierarchical Codelist (partial: no levels)

See the XML mapping sample for a live demo.

Usage

Either include the library on a web page or require in Node.js.

Mapping

mapSDMXMLResponse

Maps SDMX-ML Structure message into Javascript objects. Accepts a SDMX-ML 2.1 Structure Message as input.

// req is a XMLHttpRequest object
var msg = sdmxmllib.mapSDMXMLResponse(req.responseText);

console.log(msg.header.id);                 // "IDREF99224"
console.log(msg.resources.length);          // 10
console.log(msg.resources[0].id);           // "CL_ADJUSTMENT"
console.log(msg.resources[0].name);         // "Adjustment indicator code list"
console.log(msg.resources[0].items[0].id);  // "C"

Readme

Keywords

Package Sidebar

Install

npm i sdmxmllib

Weekly Downloads

0

Version

0.7.3

License

MIT

Last publish

Collaborators

  • airosa