How to use the node-expat.parser function in node-expat

To help you get started, we’ve selected a few node-expat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shimondoodkin / node-wurfl / index.js View on Github external
function complete(error,response,data)
  {
   var parser=new expat.parser(); // new instance of parser
   //console.log(profileurl);
   //console.log(data); 
   parser.parse(data);
   var specs=parser.root;
   
   if(specs.RDF)
   {
    // array to object implementation:
    if(!(specs.RDF instanceof Array)&&specs.RDF.Description)
    {
     specs.RDF=[specs.RDF.Description];
    }
     
    
    for(var n=0,j=specs.RDF.length;n
github shimondoodkin / node-wurfl / index.js View on Github external
require('fs').readFile(__dirname+'/wurfl-latest.xml', 'utf-8',function (err, data) {
  if (err) throw err;
  var xmlparser=new expat.parser();
  xmlparser.parse(data);
  self.data=xmlparser.root;
  callback();
 });
}this.loadxml=loadxml;

node-expat

NodeJS binding for fast XML parsing.

MIT
Latest version published 2 months ago

Package Health Score

86 / 100
Full package analysis