node-pom-parser

0.1.1 • Public • Published

Node.js pom.xml Parser

Build Status

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!

Package Sidebar

Install

npm i node-pom-parser

Weekly Downloads

62

Version

0.1.1

License

MIT

Last publish

Collaborators

  • marcellodesales