{"id":44562220,"url":"https://github.com/dgrr/quickxml","last_synced_at":"2026-02-13T23:43:22.931Z","repository":{"id":57521020,"uuid":"225893395","full_name":"dgrr/quickxml","owner":"dgrr","description":"Fast XML iterative (SAX) decoder in pure Go.","archived":false,"fork":false,"pushed_at":"2020-10-22T09:14:25.000Z","size":92,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-23T02:21:27.312Z","etag":null,"topics":["fast","go","golang","parser","pure","xml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dgrr.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":"2019-12-04T15:02:57.000Z","updated_at":"2020-10-22T09:14:28.000Z","dependencies_parsed_at":"2022-09-26T18:01:10.367Z","dependency_job_id":null,"html_url":"https://github.com/dgrr/quickxml","commit_stats":null,"previous_names":["dgrr/xml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dgrr/quickxml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrr%2Fquickxml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrr%2Fquickxml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrr%2Fquickxml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrr%2Fquickxml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgrr","download_url":"https://codeload.github.com/dgrr/quickxml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrr%2Fquickxml/sbom","scorecard":{"id":339719,"data":{"date":"2025-08-11","repo":{"name":"github.com/dgrr/quickxml","commit":"4977de546d6cc4766c57616e50410878356043dc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T05:30:15.060Z","repository_id":57521020,"created_at":"2025-08-18T05:30:15.061Z","updated_at":"2025-08-18T05:30:15.061Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29423542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"last_error":"SSL_read: 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":["fast","go","golang","parser","pure","xml"],"created_at":"2026-02-13T23:43:19.562Z","updated_at":"2026-02-13T23:43:22.920Z","avatar_url":"https://github.com/dgrr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quick XML\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/dgrr/xml)](https://goreportcard.com/report/github.com/dgrr/xml)\n[![Build Status](https://travis-ci.com/dgrr/xml.svg?branch=master)](https://travis-ci.com/dgrr/xml)\n[![codecov](https://codecov.io/gh/dgrr/xml/branch/master/graph/badge.svg)](https://codecov.io/gh/dgrr/xml)\n\nQuickXML is a package to process XML files in an iterative way. It doesn't use reflect so you'll need to work a little more :D\n\nMost of the times working with XML is a painful task. Also, the Golang std library doesn't help too much. Neither is fast nor has good doc. This library just tries to process XML files in an iterative way, ignoring most of the common errors in XML (not closing tags or putting optional tags). It just detects when a tag is open and closed (if it's closed), and it doesn't have control whether the tag X has been open before Y was closed or viceversa.\n\n**IMPORTANT NOTE: This package doesn't provide a fully featured XML. It has been created for XLSX parsing.**\n\nPRs are welcome.\n\n# How QuickXML performs?\n\n\n![alt_text](https://github.com/dgrr/quickxml/blob/master/_imgs/alloc_time.png)\n\nThe graph shows the amount of memory used (blue) represented in the left axis.\nAnd the time spent in seconds (red) represented in the right axis.\n\nAs you can see, QuickXML is the fastest and the second one on memory usage.in\n\n# Example\n\n\n```go\n// +build ignore\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\txml \"github.com/dgrr/quickxml\"\n)\n\n// Book represents our XML structure\ntype Book struct {\n\tCategory string\n\tTitle    string\n\tAuthors  []string\n\tYear     string\n\tPrice    string\n}\n\n// String will print the book info in a string (for fmt)\nfunc (book Book) String() string {\n\treturn fmt.Sprintf(\n\t\t\"%s\\n  Title: %s\\n  Authors: %s\\n  Year: %s\\n  Price: %s\",\n\t\tbook.Category, book.Title, strings.Join(book.Authors, \", \"), book.Year, book.Price,\n\t)\n}\n\nfunc main() {\n\tconst str = `\u003cbookstore xmlns:p=\"urn:schemas-books-com:prices\"\u003e\n\n\t\u003cbook category=\"COOKING\"\u003e\n\t  \u003ctitle lang=\"en\"\u003eEveryday Italian\u003c/title\u003e\n\t  \u003cauthor\u003eGiada De Laurentiis\u003c/author\u003e\n\t  \u003cyear\u003e2005\u003c/year\u003e\n\t  \u003cp:price\u003e30.00\u003c/p:price\u003e\n\t\u003c/book\u003e\n  \n\t\u003cbook category=\"CHILDREN\"\u003e\n\t  \u003ctitle lang=\"en\"\u003eHarry Potter\u003c/title\u003e\n\t  \u003cauthor\u003eJ K. Rowling\u003c/author\u003e\n\t  \u003cyear\u003e2005\u003c/year\u003e\n\t  \u003cp:price\u003e29.99\u003c/p:price\u003e\n\t\u003c/book\u003e\n  \n\t\u003cbook category=\"WEB\"\u003e\n\t  \u003ctitle lang=\"en\"\u003eXQuery Kick Start\u003c/title\u003e\n\t  \u003cauthor\u003eJames McGovern\u003c/author\u003e\n\t  \u003cauthor\u003ePer Bothner\u003c/author\u003e\n\t  \u003cauthor\u003eKurt Cagle\u003c/author\u003e\n\t  \u003cauthor\u003eJames Linn\u003c/author\u003e\n\t  \u003cauthor\u003eVaidyanathan Nagarajan\u003c/author\u003e\n\t  \u003cyear\u003e2003\u003c/year\u003e\n\t  \u003cp:price\u003e49.99\u003c/p:price\u003e\n\t\u003c/book\u003e\n  \n\t\u003cbook category=\"WEB\"\u003e\n\t  \u003ctitle lang=\"en\"\u003eLearning XML\u003c/title\u003e\n\t  \u003cauthor\u003eErik T. Ray\u003c/author\u003e\n\t  \u003cyear\u003e2003\u003c/year\u003e\n\t  \u003cp:price\u003e39.95\u003c/p:price\u003e\n\t\u003c/book\u003e\n  \n  \u003c/bookstore\u003e`\n\n\tbook := Book{}\n\tr := xml.NewReader(strings.NewReader(str))\n\tfor r.Next() {\n\t\tswitch e := r.Element().(type) {\n\t\tcase *xml.StartElement:\n\t\t\tswitch e.Name() {\n\t\t\tcase \"book\": // start reading a book\n\t\t\t\tattr := e.Attrs().Get(\"category\")\n\t\t\t\tif attr != nil {\n\t\t\t\t\tbook.Category = attr.Value()\n\t\t\t\t}\n\t\t\tcase \"title\": // You can capture the lang too using e.Attrs()\n\t\t\t\tr.AssignNext(\u0026book.Title)\n\t\t\t\t// AssignNext will assign the next text found to book.Title\n\t\t\tcase \"author\":\n\t\t\t\tnext := len(book.Authors)\n\t\t\t\tbook.Authors = append(book.Authors, \"\")\n\t\t\t\tr.AssignNext(\u0026book.Authors[next])\n\t\t\tcase \"year\":\n\t\t\t\tr.AssignNext(\u0026book.Year)\n\t\t\tcase \"p:price\":\n\t\t\t\tr.AssignNext(\u0026book.Price)\n\t\t\t}\n\t\tcase *xml.EndElement:\n\t\t\tif e.Name() == \"book\" { // book parsed\n\t\t\t\tfmt.Printf(\"%s\\n\", book)\n\t\t\t}\n\t\t}\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgrr%2Fquickxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgrr%2Fquickxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgrr%2Fquickxml/lists"}