ProblemXml
The application/problem+xml codec, per RFC 9457 Appendix B.
Hand-written over xmlutil's plain XmlReader/XmlWriter, not driven by a serialization framework. Extension members produce element names that are only known at runtime, and a serial descriptor cannot express that.
Properties
Appendix B: an element whose children are all named i is an array.
The media type as a plain String, since this module must not depend on Ktor.
The name Appendix B gives the document element. The reader rejects a document rooted at anything else. §3's leniency covers members; it says nothing about accepting any XML document as a problem document.
Functions
Reads an application/problem+xml document, tolerating the deviations RFC 9457 §3 asks a consumer to tolerate: an unrecognised member, a wrong-typed one, a missing namespace.
Writes problem as an application/problem+xml document, always in UTF-8.