{"id":36419670,"url":"https://github.com/kobjects/ktxml","last_synced_at":"2026-01-11T17:05:14.473Z","repository":{"id":57742730,"uuid":"446544093","full_name":"kobjects/ktxml","owner":"kobjects","description":"kxml goes kotlin","archived":false,"fork":false,"pushed_at":"2025-06-13T19:30:17.000Z","size":208,"stargazers_count":29,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-13T20:32:20.403Z","etag":null,"topics":["kotlin","kotlin-multiplatform","xml","xml-parser"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/kobjects.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":"2022-01-10T18:49:24.000Z","updated_at":"2025-06-13T19:30:20.000Z","dependencies_parsed_at":"2024-05-12T10:47:35.467Z","dependency_job_id":null,"html_url":"https://github.com/kobjects/ktxml","commit_stats":null,"previous_names":["kobjects/kxml3"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/kobjects/ktxml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobjects%2Fktxml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobjects%2Fktxml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobjects%2Fktxml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobjects%2Fktxml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kobjects","download_url":"https://codeload.github.com/kobjects/ktxml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kobjects%2Fktxml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"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":["kotlin","kotlin-multiplatform","xml","xml-parser"],"created_at":"2026-01-11T17:05:13.797Z","updated_at":"2026-01-11T17:05:14.463Z","avatar_url":"https://github.com/kobjects.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KtXml\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.kobjects.ktxml/core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.kobjects.ktxml/core)\n\nMinimal platform-agnostic non-validating XML pull parser based on kxml2.\n\nThe most significant changes (relative to XmlPull / [KXml2](https://github.com/kobjects/kxml2)) are:\n\n- Replaced the Reader as input with CharIterator support, as Java streams are not available for Kotlin native.\n- Reduced the number of places where null is returned\n- Factories removed\n\nImport in `build.gradle.kts` for a \"shared\" KMP module:\n\n```\n(...)\n\nkotlin {\n  \n      (...)\n  \n      sourceSets {\n          val commonMain by getting {\n              dependencies {\n                  implementation(\"org.kobjects.ktxml:core:0.3.2\")\n                  (...)\n              }\n          }\n          \n      (...)  \n              \n```\n\nKtXML is implemented in pure Kotlin, so it should work on all platforms supported by Kotlin.\n\n\n## News\n\n- 2025-06-15 Version bumped to 1.0 and artifacts for all platforms are now included in the Maven artifacts -- thanks to Sargun!\n\n## Usage\n\nThe most important calls in KtXml are `next()` and `nextToken()`. \n\n- `next()` moves to the next \"high level\" token and returns the token type. It skips over \n  comments and processing instructions and automatically decodes entity references. It also might\n  aggregate text content.\n\n- `nextToken()` moves to the next \"low level\" token including whitespace, processing instructions,\n  comments and entity references.\n\nAfter a call to `next()` or `nextToken()`, the details of the current token (such as tag attributes) \ncan be queried from the parser; see [XmlPullParser](https://github.com/kobjects/ktxml/blob/main/core/src/commonMain/kotlin/org/kobjects/ktxml/api/XmlPullParser.kt)\n\nTypically these calls are used to implement recursive descend parsing of a specific XML format.\n\nPlease always use the interface (XmlPullParser) and never the concrete parser implementation\n(MiniXmlPullParser) when passing the parser around.\n\nFor a set of small code examples, please take a look at the [test](https://github.com/kobjects/ktxml/blob/main/core/src/commonTest/kotlin/org/kobjects/ktxml/KtXmlTest.kt).\n\nFor more information about the API, please refer to the [KtXml API documentation](https://kobjects.org/ktxml/dokka/).\n\n## Use cases\n\n- [Twine RSS Reader](https://github.com/msasikanth/twine/)\n  ([Parsing Code](https://github.com/msasikanth/twine/tree/main/core/network/src/commonMain/kotlin/dev/sasikanth/rss/reader/core/network/parser))\n- [MapLibre Compose](https://github.com/maplibre/maplibre-compose) via [HtmlConverterCompose](https://github.com/cbeyls/HtmlConverterCompose). \n\n## FAQ\n\n### How can I stream data to the parser? \n\nSee https://github.com/kobjects/ktxml/issues/6\n\n### Where is Wbxml / kDom support from kXML2?\n\nIf you are missing anything from kXML2, please file a feature request by creating a corresponding\nissue in the github issue tracker.\n\n### I have a Pull Request for an Improvement\n\nPlease file an issue before creating a PR.\n\nPlease try to keep PRs as \"atomic\" as possible, i.e. addressing one issue only. I can push library / Kotlin / Gradle versions up as needed beforehand where this helps.\n\n\n### I have a different problem!\n\nPlease file an issue using the github issue tracker.\n\n# Background / Design\n\nBrainstorming document: https://docs.google.com/document/d/1OXG5F5I-Gp-65cN8THWB1LMTZDnRS96CIBenPcusDDA/edit?usp=sharing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkobjects%2Fktxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkobjects%2Fktxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkobjects%2Fktxml/lists"}