-
Notifications
You must be signed in to change notification settings - Fork 49
Using OGC Schemas with Browserify
Alexey Valikov edited this page Apr 18, 2015
·
3 revisions
- Require
jsonix
, - Require
w3c-schemas/lib/<Mapping>
(for required W3C Schemas mappings) - Require
ogc-schemas/lib/<Mapping>
(for required OGC Schemas mappings) - Build
browserify app.js -o bundle.js
var Jsonix = require('jsonix').Jsonix;
var XLink_1_0 = require('w3c-schemas/lib/XLink_1_0').XLink_1_0;
var OWS_1_1_0 = require('ogc-schemas/lib/OWS_1_1_0').OWS_1_1_0;
var WMS_1_3_0 = require('ogc-schemas/lib/WMS_1_3_0').WMS_1_3_0;
var context = new Jsonix.Context([XLink_1_0, OWS_1_1_0, WMS_1_3_0], {
// Not required but recommended
namespacePrefixes: {
'http://www.w3.org/1999/xlink': 'xlink',
'http://www.opengis.net/wms': 'wms',
'http://www.opengis.net/ows/1.1': 'ows'
}
});
var unmarshaller = context.createUnmarshaller();
unmarshaller.unmarshalURL('WMS_Capabilities.xml', function(result) {
console.log(JSON.stringify(result, null, 2));
});