{"id":17964835,"url":"https://github.com/edragonconnect/fast_xml_to_map","last_synced_at":"2026-05-15T23:01:56.197Z","repository":{"id":98932368,"uuid":"177583326","full_name":"edragonconnect/fast_xml_to_map","owner":"edragonconnect","description":"Creates an Elixir Map data structure from an XML string","archived":false,"fork":false,"pushed_at":"2019-03-26T08:34:32.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-03-07T04:05:00.397Z","etag":null,"topics":["elixir","erlang","xml","xml-parser"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/edragonconnect.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-25T12:36:00.000Z","updated_at":"2019-03-26T08:34:33.000Z","dependencies_parsed_at":"2023-03-22T07:34:00.376Z","dependency_job_id":null,"html_url":"https://github.com/edragonconnect/fast_xml_to_map","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edragonconnect/fast_xml_to_map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edragonconnect%2Ffast_xml_to_map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edragonconnect%2Ffast_xml_to_map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edragonconnect%2Ffast_xml_to_map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edragonconnect%2Ffast_xml_to_map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edragonconnect","download_url":"https://codeload.github.com/edragonconnect/fast_xml_to_map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edragonconnect%2Ffast_xml_to_map/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32421975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["elixir","erlang","xml","xml-parser"],"created_at":"2024-10-29T12:09:03.545Z","updated_at":"2026-04-29T10:34:10.604Z","avatar_url":"https://github.com/edragonconnect.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastXmlToMap\n\n**Creates an Elixir Map data structure from an XML string**\n\nUsage:\n\n```elixir\n\nInteractive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)\niex(1)\u003e FastXmlToMap.naive_map(\"\u003cfoo\u003e\u003cbar\u003e123\u003c/bar\u003e\u003c/foo\u003e\")\n%{\"foo\" =\u003e %{\"bar\" =\u003e \"123\"}}\niex(2)\u003e FastXmlToMap.naive_map_fxml(\"\u003cfoo\u003e\u003cbar\u003e123\u003c/bar\u003e\u003c/foo\u003e\")\n%{\"foo\" =\u003e %{\"bar\" =\u003e \"123\"}}\niex(3)\u003e FastXmlToMap.fxml_map(\"\u003cfoo\u003e\u003cbar\u003e123\u003c/bar\u003e\u003c/foo\u003e\")      \n%{\"foo\" =\u003e [%{\"bar\" =\u003e [\"123\"]}]}\n```\n\n```elixir\nErlang/OTP 21 [erts-10.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]\n\nInteractive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)\niex(1)\u003e FastXmlToMap.naive_map(\"\u003cfoo\u003e\u003cpoint\u003e\u003cx\u003e1\u003c/x\u003e\u003cy\u003e5\u003c/y\u003e\u003c/point\u003e\u003cpoint\u003e\u003cx\u003e2\u003c/x\u003e\u003cy\u003e9\u003c/y\u003e\u003c/point\u003e\u003c/foo\u003e\")\n%{\"foo\" =\u003e %{\"point\" =\u003e [%{\"x\" =\u003e \"1\", \"y\" =\u003e \"5\"}, %{\"x\" =\u003e \"2\", \"y\" =\u003e \"9\"}]}}\niex(2)\u003e FastXmlToMap.naive_map_fxml(\"\u003cfoo\u003e\u003cpoint\u003e\u003cx\u003e1\u003c/x\u003e\u003cy\u003e5\u003c/y\u003e\u003c/point\u003e\u003cpoint\u003e\u003cx\u003e2\u003c/x\u003e\u003cy\u003e9\u003c/y\u003e\u003c/point\u003e\u003c/foo\u003e\")\n%{\"foo\" =\u003e %{\"point\" =\u003e [%{\"x\" =\u003e \"1\", \"y\" =\u003e \"5\"}, %{\"x\" =\u003e \"2\", \"y\" =\u003e \"9\"}]}}\niex(3)\u003e FastXmlToMap.fxml_map(\"\u003cfoo\u003e\u003cpoint\u003e\u003cx\u003e1\u003c/x\u003e\u003cy\u003e5\u003c/y\u003e\u003c/point\u003e\u003cpoint\u003e\u003cx\u003e2\u003c/x\u003e\u003cy\u003e9\u003c/y\u003e\u003c/point\u003e\u003c/foo\u003e\")      \n%{\n  \"foo\" =\u003e [\n    %{\"point\" =\u003e [%{\"x\" =\u003e [\"1\"]}, %{\"y\" =\u003e [\"5\"]}]},\n    %{\"point\" =\u003e [%{\"x\" =\u003e [\"2\"]}, %{\"y\" =\u003e [\"9\"]}]}\n  ]\n}\n```\n\n**FastXmlToMap.naive_map** api depends on **Erlsom** to parse xml then converts the return data into a map.\n**FastXmlToMap.naive_map_fxml** and **FastXmlToMap.fxml_map** apis depends on **fast_xml** to pasrse xml then converts the return data into a map.\n\n\n## Installation\n\nAdd `fast_xml_to_map` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:fast_xml_to_map, \"~\u003e 0.1.1\"}]\nend\n```\n\nOr install with github  \n```elixir\ndef deps do\n  [{:fast_xml_to_map, git: \"https://github.com/edragonconnect/fast_xml_to_map.git\", branch: \"master\"}]\nend\n```\n\n## LICENSE  \n\n[The MIT License (MIT)](./LICENSE)  \nCopyright (c) 2019 [eDragonConnect Team](https://github.com/edragonconnect/)\n  \n## Benchmark\n```\n============================================================\n=======================sim_data=============================\n============================================================\n\nOperating System: macOS\nCPU Information: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz\nNumber of Available Cores: 4\nAvailable memory: 8 GB\nElixir 1.8.1\nErlang 21.3\n\nBenchmark suite executing with the following configuration:\nwarmup: 2 s\ntime: 5 s\nmemory time: 2 s\nparallel: 4\ninputs: none specified\nEstimated total run time: 27 s\n\n\nBenchmarking fxml_map sim_data...\nBenchmarking naive_map sim_data...\nBenchmarking naive_map_fxml sim_data...\n\nName                              ips        average  deviation         median         99th %\nnaive_map sim_data               4.79      208.59 ms    ±14.48%      196.33 ms      325.92 ms\nfxml_map sim_data                1.98      504.75 ms     ±3.29%      505.58 ms      543.33 ms\nnaive_map_fxml sim_data          1.41      710.04 ms     ±4.14%      711.31 ms      777.63 ms\n\nComparison: \nnaive_map sim_data               4.79\nfxml_map sim_data                1.98 - 2.42x slower\nnaive_map_fxml sim_data          1.41 - 3.40x slower\n\nMemory usage statistics:\n\nName                            average  deviation         median         99th %\nnaive_map sim_data             67.71 MB     ±0.00%       67.71 MB       67.71 MB\nfxml_map sim_data              69.92 MB     ±0.00%       69.92 MB       69.92 MB\nnaive_map_fxml sim_data        83.43 MB     ±0.00%       83.43 MB       83.43 MB\n\nComparison: \nnaive_map sim_data             67.71 MB\nfxml_map sim_data              69.92 MB - 1.03x memory usage\nnaive_map_fxml sim_data        83.43 MB - 1.23x memory usage\n\n============================================================\n======================ama_data==============================\n============================================================\n\nOperating System: macOS\nCPU Information: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz\nNumber of Available Cores: 4\nAvailable memory: 8 GB\nElixir 1.8.1\nErlang 21.3\n\nBenchmark suite executing with the following configuration:\nwarmup: 2 s\ntime: 5 s\nmemory time: 2 s\nparallel: 4\ninputs: none specified\nEstimated total run time: 27 s\n\n\nBenchmarking fxml_map ama_data...\nBenchmarking naive_map ama_data...\nBenchmarking naive_map_fxml ama_data...\n\nName                              ips        average  deviation         median         99th %\nnaive_map ama_data               0.34         2.95 s    ±10.81%         2.98 s         3.29 s\nfxml_map ama_data                0.31         3.19 s     ±4.33%         3.18 s         3.33 s\nnaive_map_fxml ama_data         0.192         5.20 s     ±1.25%         5.22 s         5.25 s\n\nComparison: \nnaive_map ama_data               0.34\nfxml_map ama_data                0.31 - 1.08x slower\nnaive_map_fxml ama_data         0.192 - 1.76x slower\n\nMemory usage statistics:\n\nName                            average  deviation         median         99th %\nnaive_map ama_data            466.45 MB     ±0.00%      466.45 MB      466.45 MB\nfxml_map ama_data             334.13 MB     ±0.00%      334.13 MB      334.13 MB\nnaive_map_fxml ama_data       432.79 MB     ±0.00%      432.79 MB      432.79 MB\n\nComparison: \nnaive_map ama_data            466.45 MB\nfxml_map ama_data             334.13 MB - 0.72x memory usage\nnaive_map_fxml ama_data       432.79 MB - 0.93x memory usage\n\n============================================================\n====================long_ama_data===========================\n============================================================\n\nOperating System: macOS\nCPU Information: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz\nNumber of Available Cores: 4\nAvailable memory: 8 GB\nElixir 1.8.1\nErlang 21.3\n\nBenchmark suite executing with the following configuration:\nwarmup: 2 s\ntime: 5 s\nmemory time: 2 s\nparallel: 4\ninputs: none specified\nEstimated total run time: 27 s\n\n\nBenchmarking fxml_map long_ama_data...\nBenchmarking naive_map long_ama_data...\nBenchmarking naive_map_fxml long_ama_data...\n\nName                                   ips        average  deviation         median         99th %\nnaive_map long_ama_data              0.150         6.66 s     ±1.01%         6.67 s         6.74 s\nfxml_map long_ama_data               0.121         8.25 s     ±0.86%         8.23 s         8.33 s\nnaive_map_fxml long_ama_data        0.0658        15.19 s     ±2.61%        15.29 s        15.54 s\n\nComparison: \nnaive_map long_ama_data              0.150\nfxml_map long_ama_data               0.121 - 1.24x slower\nnaive_map_fxml long_ama_data        0.0658 - 2.28x slower\n\nMemory usage statistics:\n\nName                                 average  deviation         median         99th %\nnaive_map long_ama_data              1.26 GB     ±0.00%        1.26 GB        1.26 GB\nfxml_map long_ama_data               0.91 GB     ±0.00%        0.91 GB        0.91 GB\nnaive_map_fxml long_ama_data         1.20 GB     ±0.00%        1.20 GB        1.20 GB\n\nComparison: \nnaive_map long_ama_data              1.26 GB\nfxml_map long_ama_data               0.91 GB - 0.72x memory usage\nnaive_map_fxml long_ama_data         1.20 GB - 0.95x memory usage\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedragonconnect%2Ffast_xml_to_map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedragonconnect%2Ffast_xml_to_map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedragonconnect%2Ffast_xml_to_map/lists"}