{"id":17989284,"url":"https://github.com/elihwyma/pugiswift","last_synced_at":"2025-07-14T06:04:02.230Z","repository":{"id":260120894,"uuid":"880321232","full_name":"elihwyma/PugiSwift","owner":"elihwyma","description":"Blazing fast XML Parser in Swift for all platforms","archived":false,"fork":false,"pushed_at":"2025-07-06T17:31:33.000Z","size":384,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T18:37:38.438Z","etag":null,"topics":["concurrency","linux","swift","vapor","xml"],"latest_commit_sha":null,"homepage":"https://swiftpackageindex.com/elihwyma/PugiSwift/0.3.0/documentation/pugiswift","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elihwyma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"elihwyma","patreon":"elihwyma"}},"created_at":"2024-10-29T14:13:50.000Z","updated_at":"2025-07-06T17:31:36.000Z","dependencies_parsed_at":"2024-11-24T18:22:01.807Z","dependency_job_id":"e7c3845e-0a74-44d1-b973-e520424e1461","html_url":"https://github.com/elihwyma/PugiSwift","commit_stats":null,"previous_names":["elihwyma/pugiswift"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/elihwyma/PugiSwift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elihwyma%2FPugiSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elihwyma%2FPugiSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elihwyma%2FPugiSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elihwyma%2FPugiSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elihwyma","download_url":"https://codeload.github.com/elihwyma/PugiSwift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elihwyma%2FPugiSwift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265249246,"owners_count":23734417,"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":["concurrency","linux","swift","vapor","xml"],"created_at":"2024-10-29T19:14:13.103Z","updated_at":"2025-07-14T06:04:02.204Z","avatar_url":"https://github.com/elihwyma.png","language":"C++","funding_links":["https://github.com/sponsors/elihwyma","https://patreon.com/elihwyma"],"categories":[],"sub_categories":[],"readme":"# PugiSwift\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Felihwyma%2FPugiSwift%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/elihwyma/PugiSwift)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Felihwyma%2FPugiSwift%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/elihwyma/PugiSwift)\n\n\nPugiSwift is a Swift wrapper around the C++ library [pugixml](https://github.com/zeux/pugixml). The aim is to provide a fast way to parse XML with Swift on both Apple platforms and on the server with Vapor.\n\nThe current version of pugixml bundled is [1.14](https://github.com/zeux/pugixml/releases/tag/v1.14).\n\npugixml is licensed under the MIT license and a copy can be found [here](Sources/pugixml/LICENSE.md).\n\n## Benchmarking\nPugiSwift has been benchmarked among other popular alterative Swift packages. The code for this benchmark is available [in this repo](https://github.com/elihwyma/PugiSwiftComparisons). The test was in Release mode with the debugger turned off. Comparisons were made against [Fuzi](https://github.com/cezheng/Fuzi.git) and [XMLCoder](https://github.com/CoreOffice/XMLCoder.git).\n\n```mermaid\nxychart-beta\n    title \"Parses per second of 212kb file\"\n    x-axis \"Programs\" [\"PugiSwift\", \"Fuzi\", \"XMLCoder\"]\n    bar [757, 207, 54]\n```\n\n## Example Usage\n\n```swift\nimport Foundation\nimport PugiSwift\n\n@Node struct Records {\n    @Attribute let value: String\n    @Element(childrenCodingKey: \"record\") let records: [Record]\n}\n\n@Node struct Record {\n    let name: String\n    let list: Int\n}\n\nlet str =\n\"\"\"\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?\u003e\n\u003crecords value=\"Hello World\"\u003e\n    \u003crecord\u003e\n        \u003cname\u003ePaul Koch\u003c/name\u003e\n        \u003clist\u003e17\u003c/list\u003e\n    \u003c/record\u003e\n\u003c/records\u003e \n\"\"\"\n\ndo {\n    let records = try Records(from: str)\n    print(records)\n} catch {\n    print(\"Error: \\(error.localizedDescription)\")\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felihwyma%2Fpugiswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felihwyma%2Fpugiswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felihwyma%2Fpugiswift/lists"}