{"id":13509752,"url":"https://github.com/gunnar2k/elixir-map-to-xml","last_synced_at":"2026-03-01T04:33:41.009Z","repository":{"id":56841847,"uuid":"279965742","full_name":"gunnar2k/elixir-map-to-xml","owner":"gunnar2k","description":"Converts an Elixir map to an XML document.","archived":false,"fork":false,"pushed_at":"2024-05-24T14:08:57.000Z","size":10,"stargazers_count":5,"open_issues_count":2,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-25T04:55:13.037Z","etag":null,"topics":["xml"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/elixir_map_to_xml","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gunnar2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-15T20:03:25.000Z","updated_at":"2024-01-17T11:52:32.000Z","dependencies_parsed_at":"2022-08-29T06:50:53.269Z","dependency_job_id":null,"html_url":"https://github.com/gunnar2k/elixir-map-to-xml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gunnar2k/elixir-map-to-xml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar2k%2Felixir-map-to-xml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar2k%2Felixir-map-to-xml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar2k%2Felixir-map-to-xml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar2k%2Felixir-map-to-xml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunnar2k","download_url":"https://codeload.github.com/gunnar2k/elixir-map-to-xml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunnar2k%2Felixir-map-to-xml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29960253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"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":["xml"],"created_at":"2024-08-01T02:01:12.391Z","updated_at":"2026-03-01T04:33:40.988Z","avatar_url":"https://github.com/gunnar2k.png","language":"Elixir","funding_links":[],"categories":["XML"],"sub_categories":[],"readme":"# MapToXml\n\nConverts an Elixir map to an XML document. Inspired by [XmlToMap](https://github.com/homanchou/elixir-xml-to-map).\n\nDocumentation can be found at [https://hexdocs.pm/elixir_map_to_xml](https://hexdocs.pm/elixir_map_to_xml).\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `elixir_map_to_xml` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:elixir_map_to_xml, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Usage\n\n### Basic example\n\n```elixir\nMapToXml.from_map(%{\n  \"tag1\" =\u003e \"value1\",\n  \"tag2\" =\u003e \"value2\",\n  \"tag3\" =\u003e \"value3\"\n})\n```\n\nwill output:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003ctag1\u003evalue1\u003c/tag1\u003e\n\u003ctag2\u003evalue2\u003c/tag2\u003e\n\u003ctag3\u003evalue3\u003c/tag3\u003e\n```\n\n### Nested maps\n\n```elixir\nMapToXml.from_map(%{\n  \"tag1\" =\u003e %{\n    \"tag2\" =\u003e %{\n      \"tag3\" =\u003e \"value\"\n    }\n  }\n})\n```\n\nwill output:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003ctag1\u003e\n  \u003ctag2\u003e\n    \u003ctag3\u003evalue\u003c/tag3\u003e\n  \u003c/tag2\u003e\n\u003c/tag1\u003e\n```\n\n### Repeated child tags\n\n```elixir\nMapToXml.from_map(%{\n  \"Tags\" =\u003e %{\n    \"Tag1\" =\u003e [\n      %{\"Sub1\" =\u003e \"Val1\"},\n      %{\"Sub1\" =\u003e \"Val2\"},\n      %{\"Sub1\" =\u003e \"Val3\"}\n    ]\n  }\n})\n```\n\nwill output:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cTags\u003e\n  \u003cTag1\u003e\n    \u003cSub1\u003eVal1\u003c/Sub1\u003e\n  \u003c/Tag1\u003e\n  \u003cTag1\u003e\n    \u003cSub1\u003eVal2\u003c/Sub1\u003e\n  \u003c/Tag1\u003e\n  \u003cTag1\u003e\n    \u003cSub1\u003eVal3\u003c/Sub1\u003e\n  \u003c/Tag1\u003e\n\u003c/Tags\u003e\n```\n\n### Attributes\n\n```elixir\nMapToXml.from_map(%{\n  \"Tag1\" =\u003e %{\n    \"#content\" =\u003e \"some value\",\n    \"-id\" =\u003e 123,\n    \"-something\" =\u003e \"111\"\n  }\n})\n```\n\nwill output:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cTag1 id=\"123\" something=\"111\"\u003esome value\u003c/Tag1\u003e\n```\n\nSee [tests](test/map_to_xml_test.exs) for some more examples.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunnar2k%2Felixir-map-to-xml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunnar2k%2Felixir-map-to-xml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunnar2k%2Felixir-map-to-xml/lists"}