recxmlvalidator
v0.0.3
Published
Validate recxml file using xsd
Downloads
4
Readme
What it is:
Valid xml text or file using recxml.xsd last version.
Exemple
//This example use promise and fs to read file and print error or if it valid. To copy past this example you have to install promise in node $ npm install promise
var promise = require('promise');
var fs = require('fs');
var lib = require('recxmlvalidator');
var pReadFile = promise.denodeify(fs.readFile);
pReadFile('./example.xml', 'utf8')
.then(function (xml_data) {
console.log(lib.recxml_valid(xml_data));
},function (err) {
console.log(err);
});
//----------------------------------------------
//Simple use example
var xml_data = require('./example.xml');
var lib = require('recxmlvalidator');
console.log(lib.recxml_valid(xml_data));