{"id":16866955,"url":"https://github.com/webern/exile","last_synced_at":"2026-03-04T08:01:18.667Z","repository":{"id":50777582,"uuid":"266231793","full_name":"webern/exile","owner":"webern","description":"XML in Rust","archived":false,"fork":false,"pushed_at":"2025-10-19T13:27:08.000Z","size":361,"stargazers_count":5,"open_issues_count":21,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T14:09:41.648Z","etag":null,"topics":["rust","xml"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/webern.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-05-23T00:11:43.000Z","updated_at":"2025-10-19T13:27:06.000Z","dependencies_parsed_at":"2023-11-13T15:51:15.623Z","dependency_job_id":null,"html_url":"https://github.com/webern/exile","commit_stats":{"total_commits":70,"total_committers":1,"mean_commits":70.0,"dds":0.0,"last_synced_commit":"c33ec5cf9e4b3cd138ec64d446af3e0a6100e182"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/webern/exile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Fexile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Fexile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Fexile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Fexile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webern","download_url":"https://codeload.github.com/webern/exile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Fexile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["rust","xml"],"created_at":"2024-10-13T14:52:15.211Z","updated_at":"2026-03-04T08:01:18.657Z","avatar_url":"https://github.com/webern.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# exile\n\nCurrent version: 0.0.9\n\n![build](https://github.com/webern/exile/workflows/exile%20ci/badge.svg)\n\n`exile` is a Rust library for reading and writing XML.\n\nThe goal, at least initially, is to provide an abstract syntax tree of an XML file.\nAs such, Exile is a dom parser and loads the complete contents of the document into memory.\n\nCurrently supported:\n- Attributes\n- CDATA Sections\n- Comment Parsing\n- Elements\n- Processing Instructions\n- Text Nodes\n- UTF-8\n- Whitespace Normalization\n\nNot Supported:\n- Doctypes\n- Entities\n- Entity References\n- Other Encodings\n- Whitesace Preservation: All text nodes are treated as if whitespace `collapse` were in-effect.\n\n## Example\n\nParsing XML looks like this.\n\n```rust\nlet xml = r#\"\n\u003croot\u003e\n  \u003cthing name=\"foo\"/\u003e\n  \u003cthing\u003ebar\u003c/thing\u003e\n\u003c/root\u003e\n\"#;\n\nlet doc = exile::parse(xml).unwrap();\nfor child in doc.root().children() {\n    println!(\"element name: {}\", child.name());\n    if let Some(attribute) = child.attribute(\"name\") {\n        println!(\"name attribute: {}\", attribute);\n    }\n}\n\n// we can create an index of elements\nlet index = doc.index();\n\n// the element at index 2 is \u003cthing\u003ebar\u003c/thing\u003e\nlet thing = index.element(2).unwrap();\n\n// the parent of index 2 is \u003croot\u003e\nlet root = index.parent(\u0026thing).unwrap();\n\nassert_eq!(\"bar\", thing.text().unwrap());\nassert_eq!(\"root\", root.name());\n```\n\nAuthoring XML looks like this.\n\n```rust\nuse exile::{Document, Element, Node};\nlet mut root = Element::from_name(\"my_root\");\nroot.add_attribute(\"foo\", \"bar\");\nlet mut child = Element::from_name(\"my_child\");\nchild.add_text(\"Hello World!\");\nroot.add_child(child);\nlet doc = Document::from_root(root);\nprintln!(\"{}\", doc.to_string());\n```\n\nThe above program prints:\n\n```xml\n\u003cmy_root foo=\"bar\"\u003e\n  \u003cmy_child\u003eHello World!\u003c/my_child\u003e\n\u003c/my_root\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebern%2Fexile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebern%2Fexile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebern%2Fexile/lists"}