0.7.3 • Published 8 years ago

sdmxmllib v0.7.3

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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"
0.7.3

8 years ago

0.7.2

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago