{
  "name": "xmlbuilder",
  "version": "2.2.1",
  "keywords": [
    "xml",
    "xmlbuilder"
  ],
  "homepage": "http://github.com/oozcitak/xmlbuilder-js",
  "description": "An XML builder for node.js",
  "author": {
    "name": "Ozgur Ozcitak",
    "email": "oozcitak@gmail.com"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "http://opensource.org/licenses/mit-license.php"
    }
  ],
  "repository": {
    "type": "git",
    "url": "git://github.com/oozcitak/xmlbuilder-js.git"
  },
  "bugs": {
    "url": "http://github.com/oozcitak/xmlbuilder-js/issues"
  },
  "main": "./lib/index",
  "engines": {
    "node": "0.8.x || 0.10.x"
  },
  "dependencies": {
    "lodash-node": "~2.4.1"
  },
  "devDependencies": {
    "coffee-script": "~1.6.3",
    "vows": "*",
    "memwatch": "*"
  },
  "scripts": {
    "prepublish": "coffee -co lib/ src/*.coffee",
    "postpublish": "rm -rf lib",
    "test": "vows test/*"
  },
  "readme": "# xmlbuilder-js\n\nAn XML builder for [node.js](http://nodejs.org/) similar to \n[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/).\n\n[![NPM version](https://badge.fury.io/js/xmlbuilder.png)](http://badge.fury.io/js/xmlbuilder)\n[![Build Status](https://secure.travis-ci.org/oozcitak/xmlbuilder-js.png)](http://travis-ci.org/oozcitak/xmlbuilder-js)\n[![Dependency Status](https://david-dm.org/oozcitak/xmlbuilder-js.png)](https://david-dm.org/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', {'for': 'node-js'})\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 for=\"node-js\">\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      '@for': 'node-js', // attributes start with @\n      repo: {\n        '@type': 'git',\n        '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // #text denotes element text\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.\n",
  "readmeFilename": "README.md",
  "_id": "xmlbuilder@2.2.1",
  "dist": {
    "shasum": "27450d73673c6ed94d4bd762f8496fe2e5b54b25"
  },
  "_from": "xmlbuilder@>=0.4.2",
  "_resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.2.1.tgz"
}
