node-pom-parser
v0.1.1
Published
The XML parser for pom.xml that is lighting fast
Downloads
227
Maintainers
Readme
Node.js pom.xml Parser
Parsing Java's pom.xml with an extremely fast XML EXPAT parser.
Installation
npm install --save node-pom-parser
Features
0.1.0: Just reads the groupId, artifactId and version.
Use
- Printing the object
var pom = ext.parsePom({ filePath: __dirname + "/pom.xml"});
console.log(pom);
It should print the object:
{ timers: { load: '0.056185ms', parse: '0.505887ms' },
artifactId: 'tynamo-parent',
groupId: 'org.tynamo',
version: '0.0.9' }
- Printing the string value
var pom2 = ext.parsePom({ filePath: __dirname + "/pom.xml", format: "text"});
console.log(pom2);
It should print the string format
org.tynamo:tynamo-parent:0.0.9
Contributing
Pull requests are welcome!