{"id":13509758,"url":"https://github.com/Overbryd/exoml","last_synced_at":"2025-03-30T14:31:40.548Z","repository":{"id":62429255,"uuid":"101002716","full_name":"Overbryd/exoml","owner":"Overbryd","description":"A module to decode/encode xml into a tree structure","archived":false,"fork":false,"pushed_at":"2020-04-02T16:10:42.000Z","size":195,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T05:16:36.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/Overbryd.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":"2017-08-22T00:12:57.000Z","updated_at":"2020-12-04T00:31:06.000Z","dependencies_parsed_at":"2022-11-01T20:02:16.159Z","dependency_job_id":null,"html_url":"https://github.com/Overbryd/exoml","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/Overbryd%2Fexoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overbryd%2Fexoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overbryd%2Fexoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overbryd%2Fexoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Overbryd","download_url":"https://codeload.github.com/Overbryd/exoml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245985935,"owners_count":20705105,"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":[],"created_at":"2024-08-01T02:01:12.553Z","updated_at":"2025-03-30T14:31:40.526Z","avatar_url":"https://github.com/Overbryd.png","language":"HTML","funding_links":[],"categories":["XML"],"sub_categories":[],"readme":"# Exoml\n\nA module to decode/encode xml into a tree structure.\n\n```\n{:exoml, \"~\u003e 0.0.4\"},\n```\n\n## Examples\n\nHandles well formed xml/html.\n\n```elixir\nExoml.decode(\"\u003ctag foo=bar\u003esome text\u003cself closing /\u003e\u003c/tag\u003e\")\n{:root, [],\n [{\"tag\", [{\"foo\", \"bar\"}],\n   [\"some text\", {\"self\", [{\"closing\", \"closing\"}], nil}]}]}\n```\n\nHandles bare strings.\n\n```elixir\nExoml.decode(\"what, this is not xml\")\n{:root, [], [\"what, this is not xml\"]}\n\nExoml.decode(\"\")\n{:root, [], []}\n```\n\nHandles stuff that any browser would render.\n\n```elixir\nExoml.decode(\"Well, it renders \u003cb\u003ein the browser\u003c/b\u003e\")\n{:root, [], [\"Well, it renders \", {\"b\", [], [\"in the browser\"]}]}\n```\n\nOne can easily `decode/1` and `encode/1` without loosing too much of the original document.\n\n```elixir\nxml = ~s'\u003ctag foo=\"bar\"\u003esome text\u003c/tag\u003e'\n^xml = Exoml.encode(Exoml.decode(xml))\n# =\u003e \"\u003ctag foo=\\\"bar\\\"\u003esome text\u003c/tag\u003e\"\n```\n\n## Performance\n\nSee `bench/` directory or run `mix bench` upon checkout.\nThere is one performance test that uses a `131K` html file.\n\nOn a `MacBookPro11,5 i7 2.5GHz 16GB RAM` it yields:\n\n```\nbenchma iterations   average time \nencode         100   12716.29 µs/op\ndecode          50   42088.74 µs/op\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `exoml` to your list of dependencies in `mix.exs`:\n\n```elixir\n{:exoml, \"~\u003e 0.0.2\"}\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/exoml](https://hexdocs.pm/exoml).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOverbryd%2Fexoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOverbryd%2Fexoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOverbryd%2Fexoml/lists"}