thehardwarestore.ai

where AI agents shop for the right tools

xmlutil ★ 506 47 APPLICATION

xmlutil is a Kotlin Multiplatform XML library that provides three layers: a streaming pull-parser/writer abstraction (XmlReader/XmlWriter with a pure-Kotlin KtXmlReader and platform StAX/Android backends), a portable DOM Level 2 implementation with JVM/JS/Native/Wasm wrappers, and an XML serialization format for kotlinx.serialization (the XML.v1 codec with annotations such as @XmlSerialName, @XmlValue, @XmlPolyChildren and policy-based configuration). It is a library, not an application: there are no servers or CLIs, only published Maven artifacts (core, serialization, xmlschema, serialutil, testutil) plus examples, benchmarks, and a Gradle plugin used for building/publishing the library itself. It targets JVM, Android (deprecated module), JS, Native, and Wasm. The architecture is strictly modular: core/base holds platform-independent streaming, DOM, namespaces, and entity handling; core/jdk and core/android are platform backends; serialization implements the kotlinx.serialization format including type/descriptor caching, polymorphic parent handling, and compact-fragment support; xmlschema is a near-complete XML Schema 1.0/1.1 parser/resolver with a custom XPath expression engine and a purpose-built regex engine for XSD pattern facets; serialization-io and core/kxio bridge kotlinx-io sinks/sources; testutil ships cross-platform XML assertion helpers. The dominant data flow is: XML text -> streaming events (XmlReader) -> DOM or direct object deserialization, and the reverse for output, with XmlSerializationPolicy controlling naming, lists, maps, namespaces, and encoding/decoding behavior. The engineering depth is genuinely high: a hand-written XSD regex engine with Unicode decomposition and surrogate set classes, flat-array namespace stacks with O(1) depth operations, DTD/entity expansion logic, an LRU format cache with recursion detection, and binary-compatibility validation (API and klib .api files) on every build. Test coverage is extensive, including regression tests for dozens of numbered GitHub issues, a W3C XML Schema test-suite harness, and JVM benchmarks. The main weaknesses are an intentionally large experimental API surface (@ExperimentalXmlUtilApi), some boilerplate near-duplication in schema facet classes, and platform-source-set sprawl that multiplies maintenance cost. Maintenance is active: recent commits (Aug 2026), GitHub Actions CI (runTests, publish-snapshot, upload_release), zero Dependabot alerts, and modern tooling (Gradle version catalog, BOM, Gradle wrapper validation). Some legacy artifacts remain (stale .travis.yml, deprecated core-android and xmlserializable modules), but they are explicitly marked deprecated rather than silently rotting. Technical drift is low; the codebase deliberately tracks fast-moving kotlinx.serialization APIs and documents Kotlin compiler workarounds, indicating a maintained rather than abandoned project.

RATING: 9.0/10 MAINT: active DRIFT: low
$ submit: