{"id":13526937,"url":"https://github.com/oozcitak/xmlbuilder-js","last_synced_at":"2025-05-14T00:08:47.758Z","repository":{"id":1156088,"uuid":"1042809","full_name":"oozcitak/xmlbuilder-js","owner":"oozcitak","description":"An XML builder for node.js","archived":false,"fork":false,"pushed_at":"2024-08-07T17:51:41.000Z","size":1009,"stargazers_count":923,"open_issues_count":8,"forks_count":106,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-13T03:30:01.552Z","etag":null,"topics":["coffeescript","javascript","node-js","xml","xmlbuilder"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oozcitak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"oozcitak"}},"created_at":"2010-11-01T20:01:15.000Z","updated_at":"2025-05-11T09:22:00.000Z","dependencies_parsed_at":"2024-11-05T20:48:59.036Z","dependency_job_id":null,"html_url":"https://github.com/oozcitak/xmlbuilder-js","commit_stats":{"total_commits":626,"total_committers":33,"mean_commits":18.96969696969697,"dds":0.4057507987220448,"last_synced_commit":"b20136cd1591d0f17ab2f184053c7150150428b2"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oozcitak%2Fxmlbuilder-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oozcitak%2Fxmlbuilder-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oozcitak%2Fxmlbuilder-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oozcitak%2Fxmlbuilder-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oozcitak","download_url":"https://codeload.github.com/oozcitak/xmlbuilder-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254044043,"owners_count":22005064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coffeescript","javascript","node-js","xml","xmlbuilder"],"created_at":"2024-08-01T06:01:38.032Z","updated_at":"2025-05-14T00:08:47.713Z","avatar_url":"https://github.com/oozcitak.png","language":"CoffeeScript","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[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)\n[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder)\n\n[![Travis Build Status](http://img.shields.io/travis/com/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://www.travis-ci.com/github/oozcitak/xmlbuilder-js)\n[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bf7odb20hj77isry?svg=true)](https://ci.appveyor.com/project/oozcitak/xmlbuilder-js)\n[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js)\n[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js)\n\n### Announcing `xmlbuilder2`:\n\nThe new release of `xmlbuilder` is available at [`xmlbuilder2`](https://github.com/oozcitak/xmlbuilder2)! `xmlbuilder2` has been redesigned from the ground up to be fully conforming to the [modern DOM specification](https://dom.spec.whatwg.org). It supports XML namespaces, provides built-in converters for multiple formats, collection functions, and more. Please see [upgrading from xmlbuilder](https://oozcitak.github.io/xmlbuilder2/upgrading-from-xmlbuilder.html) in the wiki.\n\nNew development will be focused towards `xmlbuilder2`; `xmlbuilder` will only receive critical bug fixes.\n\n### Installation:\n\n``` sh\nnpm install xmlbuilder\n```\n\n### Usage:\n\n``` js\nvar builder = require('xmlbuilder');\n\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\u003c?xml version=\"1.0\"?\u003e\n\u003croot\u003e\n  \u003cxmlbuilder\u003e\n    \u003crepo type=\"git\"\u003egit://github.com/oozcitak/xmlbuilder-js.git\u003c/repo\u003e\n  \u003c/xmlbuilder\u003e\n\u003c/root\u003e\n```\n\nIt is also possible to convert objects into nodes:\n\n``` js\nvar builder = require('xmlbuilder');\n\nvar obj = {\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\nvar xml = builder.create(obj).end({ pretty: true});\nconsole.log(xml);\n```\n\nIf you need to do some processing:\n\n``` js\nvar builder = require('xmlbuilder');\n\nvar root = builder.create('squares');\nroot.com('f(x) = x^2');\nfor(var i = 1; i \u003c= 5; i++)\n{\n  var item = root.ele('data');\n  item.att('x', i);\n  item.att('y', i * i);\n}\n\nvar xml = root.end({ pretty: true});\nconsole.log(xml);\n```\n\nThis will result in:\n\n``` xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003csquares\u003e\n  \u003c!-- f(x) = x^2 --\u003e\n  \u003cdata x=\"1\" y=\"1\"/\u003e\n  \u003cdata x=\"2\" y=\"4\"/\u003e\n  \u003cdata x=\"3\" y=\"9\"/\u003e\n  \u003cdata x=\"4\" y=\"16\"/\u003e\n  \u003cdata x=\"5\" y=\"25\"/\u003e\n\u003c/squares\u003e\n```\n\n### Documentation:\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\n### Donations:\nPlease consider becoming a backer or sponsor to help support development.\n\n[\u003cimg src=\"https://opencollective.com/webpack/donate/button@2x.png?color=blue\" alt=\"Donate Button\" width=\"300\"/\u003e](https://opencollective.com/xmlbuilder)\n","funding_links":["https://opencollective.com/oozcitak","https://opencollective.com/xmlbuilder"],"categories":["Repository"],"sub_categories":["Parsing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foozcitak%2Fxmlbuilder-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foozcitak%2Fxmlbuilder-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foozcitak%2Fxmlbuilder-js/lists"}