Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

w3c-schemas

highsource2.1k1.4.0

Jsonix XML-JSON mappings for W3C Schemas.

json, xml, unmarshal, unmarshalling, marshal, marshalling, parse, parsing, serialize, serializing, javascript, objects, dom, util, utility, jaxb, jsonix, mapping, atom, ws-addr, ws-addressing, ws addressing, xhtml, xlink, xmlschema, xml schema, xsd

readme

W3C Schemas

w3c-schemas package provides Jsonix XML-JSON bindings for some of the XML Schemas defined by W3C.

This allows converting between XML (conforming to one of these schemas) and JSON in with pure JavaScript.

Supports the following schemas:

  • Atom_1_0
  • WS_Addr_1_0_Core
  • XHTML_1_0_Strict
  • XLink_1_0
  • XSD_1_0

Example


var XLink_1_0 = require('w3c-schemas').XLink_1_0;

var context =  new Jsonix.Context([XLink_1_0]);
var unmarshaller = context.createUnmarshaller();
unmarshaller.unmarshalFile("tests/locator-01.xml", function(result) {
    test.equal("label", result.value.label);
    test.done();
});