{"_id":"node-xml","_rev":"12-9d7ddb33035e7d354bab139fc5555cb6","name":"node-xml","description":"An xml parser for node.js written in Javascript.","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"node-xml","version":"1.0.0","directories":{"lib":"./lib"},"main":"./lib/node-xml","engines":{"node":">=0.1.93"},"dependencies":{},"description":"An xml parser for node.js written in Javascript.","author":{"name":"Rob Righter","email":"robrighter@gmail.com"},"homepage":"https://github.com/robrighter/node-xml","repository":{"type":"git","url":"git://github.com/robrighter/node-xml.git"},"_id":"node-xml@1.0.0","_engineSupported":true,"_npmVersion":"0.2.18","_nodeVersion":"v0.3.2-pre","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"04ca2e5f5690124727a439fd8f422070d3046967","tarball":"https://registry.npmjs.org/node-xml/-/node-xml-1.0.0.tgz","integrity":"sha512-t9gTdewvkfpsv9+tb8rdsvt0/yt1JneW8xCLS+4ICKkihfSXzN8UIcxZ2hnlmO0gG0fKpyfSmPAmcqSdClAQ1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICemNVm384OgB6A4MwVtwUdUQhch79YYASP4zqG9DNgFAiEA32vuDsN55Hx1tT5RhK57A7BeMWs04LTkNxgFf97xAm0="}]}},"1.0.1":{"name":"node-xml","version":"1.0.1","directories":{"lib":"./lib"},"main":"./lib/node-xml","engines":{"node":">=0.1.93"},"dependencies":{},"description":"An xml parser for node.js written in Javascript.","author":{"name":"Rob Righter","email":"robrighter@gmail.com"},"homepage":"https://github.com/robrighter/node-xml","repository":{"type":"git","url":"git://github.com/robrighter/node-xml.git"},"_npmUser":{"name":"robrighter","email":"robrighter@gmail.com"},"_id":"node-xml@1.0.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"584150ad87192bc14eda151aefecfb93369573ad","tarball":"https://registry.npmjs.org/node-xml/-/node-xml-1.0.1.tgz","integrity":"sha512-11yInQvSITKHrfzvSBpRxcE8RV3LgI6nY3B6gVnYuM3je6eEw3RiQkZmSwYMV+aUtz5bIdpIWwvhQObLIscmCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHfgF8xHRmVNzdarjgK7/rIRWu86gi13q+UKkDh9rgnAiEA+i6hUaLiBnnQFiNVW+gh8rPxEtvg8m5fxq2NUAiOsh4="}]},"readme":"node-xml\n===================\n\n(C) Rob Righter (@robrighter) 2009 - 2010, Licensed under the MIT-LICENSE\nContributions from David Joham\n\n node-xml is an xml parser for node.js written in javascript. \n\n \nAPI\n---\n \n\nSaxParser\n---------\n\nNode-xml provides a SAX2 parser interface that can take a string, file. The parser can take characters from the document in chunks. To send chunks of the document to the parser use 'parseString(xml)'\n\n#SAX Parser#\n\n##new xml.SaxParser()##\n\t* Instantiate a new SaxParser\n\t* returns: a SaxParser object\n\n##new xml.SaxParser(callback)##\n\t* Instantiate a new SaxParser\n\t* returns: a SaxParser object\n\t* Arguments\n\t\t*callback - a function that accepts the new sax parser as an argument\n\t\n#Parse#\n\n##parser.parseString(string)##\n\nParse an in memory string\n* return: boolean. true if no errors, false otherwise\n* Arguments\n\t* string - a string representing the document to parse\n\n##parser.parseFile(filename)##\n\nParse a file\n* return: boolean. true if no errors, false otherwise\n* Arguments\n\t* filename - a string representing the file to be parsed\n\t\n##parser.pause()##\npauses parsing of the document\n\n##parser.resume()##\nresumes parsing of the document\n\n#Callbacks#\n\n##parser.onStartDocument(function() {})##\n\nCalled at the start of a document\n\n##parse.onEndDocument(function() {})##\n\n Called at the end of the document parse\n\n##parser.onStartElementNS(function(elem, attrs, prefix, uri, namespaces) {})##\n\nCalled on an open element tag\n* Arguments\n\t* elem - a string representing the element name\n\t* attrs - an array of arrays: [[key, value], [key, value]]\n\t* prefix - a string representing the namespace prefix of the element\n\t* uri - the namespace URI of the element\n\t* namespaces - an array of arrays: [[prefix, uri], [prefix, uri]]\n\n##parser.onEndElementNS(function(elem, prefix, uri) {})##\n\nCalled at the close of an element\n* Arguments\n\t* elem - a string representing the element name\n    * prefix - a string representing the namespace prefix of the element\n    * uri - the namespace URI of the element\n\n##parser.onCharacters(function(chars) {})##\n\nCalled when a set of content characters is encountered\n* Arguments\n\t* chars - a string of characters\n\n##parser.onCdata(function(cdata) {})##\n\nCalled when a CDATA is encountered\n* Arguments\n\t* cdata - a string representing the CDATA\n\n##parser.onComment(function(msg) {})##\n\nCalled when a comment is encountered\n* Arguments\n\t* msg - a string representing the comment\n\n##parser.onWarning(function(msg) {})##\n\nCalled when a warning is encountered\n* Arguments\n\t* msg - a string representing the warning message\n\n##parser.onError(function(msg) {})##\n\nCalled when an error is encountered\n   * Arguments\n\t\t* msg - a string representing the error message\n\t\n\nEXAMPLE USAGE\n-------------\n\n\tvar util = require('util');\n\tvar xml = require(\"./lib/node-xml\");\n\t\n\tvar parser = new xml.SaxParser(function(cb) {\n\t  cb.onStartDocument(function() {\n\t\t\n\t  });\n\t  cb.onEndDocument(function() {\n\t\t\n\t  });\n\t  cb.onStartElementNS(function(elem, attrs, prefix, uri, namespaces) {\n\t      util.log(\"=> Started: \" + elem + \" uri=\"+uri +\" (Attributes: \" + JSON.stringify(attrs) + \" )\");\n\t  });\n\t  cb.onEndElementNS(function(elem, prefix, uri) {\n\t      util.log(\"<= End: \" + elem + \" uri=\"+uri + \"\\n\");\n\t         parser.pause();// pause the parser\n\t         setTimeout(function (){parser.resume();}, 200); //resume the parser\n\t  });\n\t  cb.onCharacters(function(chars) {\n\t      //util.log('<CHARS>'+chars+\"</CHARS>\");\n\t  });\n\t  cb.onCdata(function(cdata) {\n\t      util.log('<CDATA>'+cdata+\"</CDATA>\");\n\t  });\n\t  cb.onComment(function(msg) {\n\t      util.log('<COMMENT>'+msg+\"</COMMENT>\");\n\t  });\n\t  cb.onWarning(function(msg) {\n\t      util.log('<WARNING>'+msg+\"</WARNING>\");\n\t  });\n\t  cb.onError(function(msg) {\n\t      util.log('<ERROR>'+JSON.stringify(msg)+\"</ERROR>\");\n\t  });\n\t});\n\t\n\n\t//example read from chunks\n\tparser.parseString(\"<html><body>\");\n\tparser.parseString(\"<!-- This is the start\");\n\tparser.parseString(\" and the end of a comment -->\");\n\tparser.parseString(\"and lots\");\n\tparser.parseString(\"and lots of text&am\");\n\tparser.parseString(\"p;some more.\");\n\tparser.parseString(\"<![CD\");\n\tparser.parseString(\"ATA[ this is\");\n\tparser.parseString(\" cdata ]]>\");\n\tparser.parseString(\"</body\");\n\tparser.parseString(\"></html>\");\n\n\t//example read from file\n\tparser.parseFile(\"sample.xml\");\n","maintainers":[{"name":"robrighter","email":"robrighter@gmail.com"}]},"1.0.2":{"name":"node-xml","version":"1.0.2","directories":{"lib":"./lib"},"main":"./lib/node-xml","engines":{"node":">=0.1.93"},"dependencies":{},"description":"An xml parser for node.js written in Javascript.","author":{"name":"Rob Righter","email":"robrighter@gmail.com"},"homepage":"https://github.com/robrighter/node-xml","repository":{"type":"git","url":"git://github.com/robrighter/node-xml.git"},"readme":"node-xml\n===================\n\n(C) Rob Righter (@robrighter) 2009 - 2010, Licensed under the MIT-LICENSE\nContributions from David Joham\n\n node-xml is an xml parser for node.js written in javascript. \n\n \nAPI\n---\n \n\nSaxParser\n---------\n\nNode-xml provides a SAX2 parser interface that can take a string, file. The parser can take characters from the document in chunks. To send chunks of the document to the parser use 'parseString(xml)'\n\n#SAX Parser#\n\n##new xml.SaxParser()##\n\t* Instantiate a new SaxParser\n\t* returns: a SaxParser object\n\n##new xml.SaxParser(callback)##\n\t* Instantiate a new SaxParser\n\t* returns: a SaxParser object\n\t* Arguments\n\t\t*callback - a function that accepts the new sax parser as an argument\n\t\n#Parse#\n\n##parser.parseString(string)##\n\nParse an in memory string\n* return: boolean. true if no errors, false otherwise\n* Arguments\n\t* string - a string representing the document to parse\n\n##parser.parseFile(filename)##\n\nParse a file\n* return: boolean. true if no errors, false otherwise\n* Arguments\n\t* filename - a string representing the file to be parsed\n\t\n##parser.pause()##\npauses parsing of the document\n\n##parser.resume()##\nresumes parsing of the document\n\n#Callbacks#\n\n##parser.onStartDocument(function() {})##\n\nCalled at the start of a document\n\n##parse.onEndDocument(function() {})##\n\n Called at the end of the document parse\n\n##parser.onStartElementNS(function(elem, attrs, prefix, uri, namespaces) {})##\n\nCalled on an open element tag\n* Arguments\n\t* elem - a string representing the element name\n\t* attrs - an array of arrays: [[key, value], [key, value]]\n\t* prefix - a string representing the namespace prefix of the element\n\t* uri - the namespace URI of the element\n\t* namespaces - an array of arrays: [[prefix, uri], [prefix, uri]]\n\n##parser.onEndElementNS(function(elem, prefix, uri) {})##\n\nCalled at the close of an element\n* Arguments\n\t* elem - a string representing the element name\n    * prefix - a string representing the namespace prefix of the element\n    * uri - the namespace URI of the element\n\n##parser.onCharacters(function(chars) {})##\n\nCalled when a set of content characters is encountered\n* Arguments\n\t* chars - a string of characters\n\n##parser.onCdata(function(cdata) {})##\n\nCalled when a CDATA is encountered\n* Arguments\n\t* cdata - a string representing the CDATA\n\n##parser.onComment(function(msg) {})##\n\nCalled when a comment is encountered\n* Arguments\n\t* msg - a string representing the comment\n\n##parser.onWarning(function(msg) {})##\n\nCalled when a warning is encountered\n* Arguments\n\t* msg - a string representing the warning message\n\n##parser.onError(function(msg) {})##\n\nCalled when an error is encountered\n   * Arguments\n\t\t* msg - a string representing the error message\n\t\n\nEXAMPLE USAGE\n-------------\n\n\tvar util = require('util');\n\tvar xml = require(\"./lib/node-xml\");\n\t\n\tvar parser = new xml.SaxParser(function(cb) {\n\t  cb.onStartDocument(function() {\n\t\t\n\t  });\n\t  cb.onEndDocument(function() {\n\t\t\n\t  });\n\t  cb.onStartElementNS(function(elem, attrs, prefix, uri, namespaces) {\n\t      util.log(\"=> Started: \" + elem + \" uri=\"+uri +\" (Attributes: \" + JSON.stringify(attrs) + \" )\");\n\t  });\n\t  cb.onEndElementNS(function(elem, prefix, uri) {\n\t      util.log(\"<= End: \" + elem + \" uri=\"+uri + \"\\n\");\n\t         parser.pause();// pause the parser\n\t         setTimeout(function (){parser.resume();}, 200); //resume the parser\n\t  });\n\t  cb.onCharacters(function(chars) {\n\t      //util.log('<CHARS>'+chars+\"</CHARS>\");\n\t  });\n\t  cb.onCdata(function(cdata) {\n\t      util.log('<CDATA>'+cdata+\"</CDATA>\");\n\t  });\n\t  cb.onComment(function(msg) {\n\t      util.log('<COMMENT>'+msg+\"</COMMENT>\");\n\t  });\n\t  cb.onWarning(function(msg) {\n\t      util.log('<WARNING>'+msg+\"</WARNING>\");\n\t  });\n\t  cb.onError(function(msg) {\n\t      util.log('<ERROR>'+JSON.stringify(msg)+\"</ERROR>\");\n\t  });\n\t});\n\t\n\n\t//example read from chunks\n\tparser.parseString(\"<html><body>\");\n\tparser.parseString(\"<!-- This is the start\");\n\tparser.parseString(\" and the end of a comment -->\");\n\tparser.parseString(\"and lots\");\n\tparser.parseString(\"and lots of text&am\");\n\tparser.parseString(\"p;some more.\");\n\tparser.parseString(\"<![CD\");\n\tparser.parseString(\"ATA[ this is\");\n\tparser.parseString(\" cdata ]]>\");\n\tparser.parseString(\"</body\");\n\tparser.parseString(\"></html>\");\n\n\t//example read from file\n\tparser.parseFile(\"sample.xml\");\n","_id":"node-xml@1.0.2","dist":{"shasum":"cea59082b100c70337111ca53e1f38f829e3bccb","tarball":"https://registry.npmjs.org/node-xml/-/node-xml-1.0.2.tgz","integrity":"sha512-gVuB6EgkzcLmz0P4xxU+Zas2L3Hs0uLwWWub2XKWiIllvyr82qKLzLApr/H/a+I/QLUvVoa52NDN127c/yfyZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/qJ3/zmVZ+tN3IL9fOoq2wztljJXBSsjqVwzFrOHvRAiEAtlugK5w/4O/E0JfwUAhcP2o7fi4zTvCx0IHeUzZTuUE="}]},"maintainers":[{"name":"robrighter","email":"robrighter@gmail.com"}]}},"maintainers":[{"name":"robrighter","email":"robrighter@gmail.com"}],"time":{"modified":"2022-06-21T23:42:28.572Z","created":"2011-02-12T21:26:56.695Z","1.0.0":"2011-02-12T21:26:56.890Z","1.0.1":"2012-03-08T00:07:51.317Z","1.0.2":"2012-09-14T02:05:58.783Z"},"author":{"name":"Rob Righter","email":"robrighter@gmail.com"},"repository":{"type":"git","url":"git://github.com/robrighter/node-xml.git"},"users":{"gprateek21":true,"superchenney":true,"sammy_winchester":true}}