{"id":16323031,"url":"https://github.com/yamadapc/create-xml-ls","last_synced_at":"2026-01-22T08:33:12.329Z","repository":{"id":11551153,"uuid":"14036854","full_name":"yamadapc/create-xml-ls","owner":"yamadapc","description":"Another JS object to XML converter","archived":false,"fork":false,"pushed_at":"2016-02-02T18:40:28.000Z","size":22,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-06T12:17:24.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","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/yamadapc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-01T06:08:04.000Z","updated_at":"2016-02-02T17:49:33.000Z","dependencies_parsed_at":"2022-09-23T00:00:52.204Z","dependency_job_id":null,"html_url":"https://github.com/yamadapc/create-xml-ls","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/yamadapc/create-xml-ls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamadapc%2Fcreate-xml-ls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamadapc%2Fcreate-xml-ls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamadapc%2Fcreate-xml-ls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamadapc%2Fcreate-xml-ls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yamadapc","download_url":"https://codeload.github.com/yamadapc/create-xml-ls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamadapc%2Fcreate-xml-ls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28659518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-10T22:53:38.175Z","updated_at":"2026-01-22T08:33:12.314Z","avatar_url":"https://github.com/yamadapc.png","language":"LiveScript","readme":"# create-xml-ls [![Build Status](https://secure.travis-ci.org/yamadapc/create-xml-ls.png?branch=master)](http://travis-ci.org/yamadapc/create-xml-ls)\r\n![](logo.png)\r\n\r\nAnother JS object to XML converter\r\n\r\n*Today, only node 0.10 is supported due to a build fail of libxmljs in node\r\n0.11*\r\n\r\n## Instalation\r\n\r\n```npm install create-xml-ls```\r\n\r\n## Example\r\n\r\n### Javascript\r\n\r\n#### createXml(obj[, options])\r\n\r\n```javascript\r\nvar createXml = require('create-xml-ls');\r\n\r\ncreateXml({\r\n  something: {\r\n    is: 'very',\r\n    ugly: {\r\n      $attr: {\r\n        IMHO: 'it sucks'\r\n      }\r\n      but: 'sometimes we have to live with it'\r\n    }\r\n  }\r\n}, { pretty: true });\r\n/* =\u003e\r\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\r\n\u003csomething\u003e\r\n  \u003cis\u003every\u003c/is\u003e\r\n  \u003cugly IMHO=\"it sucks\"\u003e\r\n    \u003cbut\u003esometimes we have to live with it\u003c/but\u003e\r\n  \u003c/ugly\u003e\r\n\u003c/something\u003e\r\n*/\r\n```\r\nIndentation is off by default, but can be toggled with ```options.pretty``` set\r\nto true.\r\n\r\nThe default attributes key is ```'$attr'```, but you can also use a custom one\r\nby setting ```options.attributesKey``` to the desired key.\r\n```javascript\r\ncreateXml({\r\n  something:\r\n    is: {\r\n      attributes: {\r\n        'kind': 'of'\r\n      },\r\n      interesting: 'about this'\r\n    }\r\n}, { pretty: true, attributesKey: 'attributes' );\r\n/* =\u003e\r\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\r\n\u003csomething\u003e\r\n  \u003cis kind=\"of\"\u003e\r\n    \u003cinteresting\u003eabout this\u003c/interesting\u003e\r\n  \u003c/is\u003e\r\n\u003c/something\u003e\r\n*/\r\n```\r\n\r\nThere's also support for array properties.\r\n```javascript\r\ncreateXml({\r\n  arrayExample: {\r\n    sometimes: [\r\n      'I',\r\n      'had',\r\n      'to',\r\n      'do',\r\n      'this'\r\n    ]\r\n  }\r\n}, { pretty: true });\r\n/* =\u003e\r\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\r\n\u003carrayExample\u003e\r\n  \u003csometimes\u003eI\u003c/sometimes\u003e\r\n  \u003csometimes\u003ehad\u003c/sometimes\u003e\r\n  \u003csometimes\u003eto\u003c/sometimes\u003e\r\n  \u003csometimes\u003edo\u003c/sometimes\u003e\r\n  \u003csometimes\u003ethis\u003c/sometimes\u003e\r\n\u003c/arrayExample\u003e\r\n*/}\r\n```\r\n\r\n## License\r\nCopyright (c) 2013 Pedro Yamada. Licensed under the MIT license.\r\n\n## Donations\nWould you like to buy me a beer? Send bitcoin to 3JjxJydvoJjTrhLL86LGMc8cNB16pTAF3y\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamadapc%2Fcreate-xml-ls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyamadapc%2Fcreate-xml-ls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamadapc%2Fcreate-xml-ls/lists"}