{ "_args": [ [ { "raw": "xmlbuilder@~9.0.1", "scope": null, "escapedName": "xmlbuilder", "name": "xmlbuilder", "rawSpec": "~9.0.1", "spec": ">=9.0.1 <9.1.0", "type": "range" }, "/Users/fzy/project/koa2_Sequelize_project/node_modules/xml2js" ] ], "_from": "xmlbuilder@>=9.0.1 <9.1.0", "_id": "xmlbuilder@9.0.4", "_inCache": true, "_location": "/xmlbuilder", "_nodeVersion": "6.11.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/xmlbuilder-9.0.4.tgz_1502884089961_0.9179640170186758" }, "_npmUser": { "name": "oozcitak", "email": "oozcitak@gmail.com" }, "_npmVersion": "3.10.10", "_phantomChildren": {}, "_requested": { "raw": "xmlbuilder@~9.0.1", "scope": null, "escapedName": "xmlbuilder", "name": "xmlbuilder", "rawSpec": "~9.0.1", "spec": ">=9.0.1 <9.1.0", "type": "range" }, "_requiredBy": [ "/xml2js" ], "_resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", "_shasum": "519cb4ca686d005a8420d3496f3f0caeecca580f", "_shrinkwrap": null, "_spec": "xmlbuilder@~9.0.1", "_where": "/Users/fzy/project/koa2_Sequelize_project/node_modules/xml2js", "author": { "name": "Ozgur Ozcitak", "email": "oozcitak@gmail.com" }, "bugs": { "url": "http://github.com/oozcitak/xmlbuilder-js/issues" }, "contributors": [], "dependencies": {}, "description": "An XML builder for node.js", "devDependencies": { "coffee-coverage": "*", "coffeescript": "github:jashkenas/coffeescript", "coveralls": "*", "istanbul": "*", "mocha": "*" }, "directories": {}, "dist": { "shasum": "519cb4ca686d005a8420d3496f3f0caeecca580f", "tarball": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz" }, "engines": { "node": ">=4.0" }, "gitHead": "f1c99a9c2abec65238ce86e8ed48bf9cb162ac6c", "homepage": "http://github.com/oozcitak/xmlbuilder-js", "keywords": [ "xml", "xmlbuilder" ], "license": "MIT", "main": "./lib/index", "maintainers": [ { "name": "oozcitak", "email": "oozcitak@gmail.com" } ], "name": "xmlbuilder", "optionalDependencies": {}, "readme": "# xmlbuilder-js\n\nAn XML builder for [node.js](https://nodejs.org/) similar to\n[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder).\n\n[](http://opensource.org/licenses/MIT)\n[](https://npmjs.com/package/xmlbuilder)\n[](https://npmjs.com/package/xmlbuilder)\n\n[](http://travis-ci.org/oozcitak/xmlbuilder-js)\n[](https://david-dm.org/oozcitak/xmlbuilder-js)\n[](https://coveralls.io/github/oozcitak/xmlbuilder-js)\n\n### Installation:\n\n``` sh\nnpm install xmlbuilder\n```\n\n### Usage:\n\n``` js\nvar builder = require('xmlbuilder');\nvar xml = builder.create('root')\n .ele('xmlbuilder')\n .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')\n .end({ pretty: true});\n\nconsole.log(xml);\n```\n\nwill result in:\n\n``` xml\n<?xml version=\"1.0\"?>\n<root>\n <xmlbuilder>\n <repo type=\"git\">git://github.com/oozcitak/xmlbuilder-js.git</repo>\n </xmlbuilder>\n</root>\n```\n\nIt is also possible to convert objects into nodes:\n\n``` js\nbuilder.create({\n root: {\n xmlbuilder: {\n repo: {\n '@type': 'git', // attributes start with @\n '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node\n }\n }\n }\n});\n```\n\nIf you need to do some processing:\n\n``` js\nvar root = builder.create('squares');\nroot.com('f(x) = x^2');\nfor(var i = 1; i <= 5; i++)\n{\n var item = root.ele('data');\n item.att('x', i);\n item.att('y', i * i);\n}\n```\n\nThis will result in:\n\n``` xml\n<?xml version=\"1.0\"?>\n<squares>\n <!-- f(x) = x^2 -->\n <data x=\"1\" y=\"1\"/>\n <data x=\"2\" y=\"4\"/>\n <data x=\"3\" y=\"9\"/>\n <data x=\"4\" y=\"16\"/>\n <data x=\"5\" y=\"25\"/>\n</squares>\n```\n\nSee the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details and [examples](https://github.com/oozcitak/xmlbuilder-js/wiki/Examples) for more complex examples.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/oozcitak/xmlbuilder-js.git" }, "scripts": { "postpublish": "rm -rf lib", "prepublish": "coffee -co lib src", "test": "mocha && istanbul report text lcov" }, "version": "9.0.4" }