{"id":26611112,"url":"https://github.com/mrbenhowl/flattenxml","last_synced_at":"2026-05-11T02:03:54.500Z","repository":{"id":57238090,"uuid":"133735275","full_name":"mrbenhowl/flattenXml","owner":"mrbenhowl","description":"Flattens formatted XML","archived":false,"fork":false,"pushed_at":"2018-05-25T04:04:39.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T10:13:14.097Z","etag":null,"topics":["flatten","flattener","javascript","nodejs","npm","xml"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mrbenhowl.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":"2018-05-16T23:56:29.000Z","updated_at":"2018-05-25T04:04:41.000Z","dependencies_parsed_at":"2022-08-26T15:11:21.595Z","dependency_job_id":null,"html_url":"https://github.com/mrbenhowl/flattenXml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbenhowl%2FflattenXml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbenhowl%2FflattenXml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbenhowl%2FflattenXml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbenhowl%2FflattenXml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrbenhowl","download_url":"https://codeload.github.com/mrbenhowl/flattenXml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245197160,"owners_count":20576135,"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":["flatten","flattener","javascript","nodejs","npm","xml"],"created_at":"2025-03-24T02:25:35.527Z","updated_at":"2026-05-11T02:03:54.405Z","avatar_url":"https://github.com/mrbenhowl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlattenXML\nSmall JavaScript/NodeJS library that takes a formatted XML string like the following: \n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?\u003e\n  \u003cSOAP-ENV:Envelope\n    xmlns:SOAPENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\u003e\n        \u003cSOAP-ENV:Body\u003e\n            \u003cm:Something xmlns:m=\"http://hedgehogsareawesome.com.au\"\u003e\n                \u003cname\u003ehedgehogs are awesome\u003c/name\u003e\n            \u003c/m:Something\u003e\n    \u003c/SOAP-ENV:Body\u003e\n\u003c/SOAP-ENV:Envelope\u003e\n```\n\nand makes it as flat as a pancake like so:\n\n```xml\n\u003cSOAP-ENV:Envelope xmlns:SOAPENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\u003e\u003cSOAP-ENV:Body\u003e\u003cm:Something xmlns:m=\"http://hedgehogsareawesome.com.au\"\u003e\u003cname\u003ehedgehogs are awesome\u003c/name\u003e\u003c/m:Something\u003e\u003c/SOAP-ENV:Body\u003e\u003c/SOAP-ENV:Envelope\u003e\n```\n\n## Installation\nUsing npm / yarn:\n```shell\nnpm i flattenxml\n\nyarn add flattenxml\n```\n\n## Usage\n```js\nconst flattenXml = require('flattenxml')\n\nconst formattedXml = `\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?\u003e\n  \u003cSOAP-ENV:Envelope\n    xmlns:SOAPENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\u003e\n        \u003cSOAP-ENV:Body\u003e\n            \u003cm:Something xmlns:m=\"http://hedgehogsareawesome.com.au\"\u003e\n                \u003cname\u003ehedgehogs are awesome\u003c/name\u003e\n            \u003c/m:Something\u003e\n    \u003c/SOAP-ENV:Body\u003e\n\u003c/SOAP-ENV:Envelope\u003e\n`\n\nconsole.log(flattenXml(formattedXml))\n```\n\n## Credits \nMade possible because of the fantastic [xmldoc](https://github.com/nfarina/xmldoc)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrbenhowl%2Fflattenxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrbenhowl%2Fflattenxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrbenhowl%2Fflattenxml/lists"}