Reimplement the serializer as an explicit work-stack walk instead of recursion, mirroring libxml2's xmlNodeDumpOutputInternal, so it is no longer the depth bottleneck. Reimplemented in Swift; no upstream code copied. Also fix a mixed-content correctness bug: formatting is now suppressed for any element with text or CDATA children (previously only when ALL children were text), so pretty-printing never injects whitespace around significant text. Note surfaced while testing: the remaining depth ceiling is the recursive Model.Node indirect enum (recursive ARC teardown overflows at extreme depth), which is why the parser must cap nesting depth (next). |
||
|---|---|---|
| .. | ||
| Options.swift | ||
| Serializer.swift | ||