Add PureXML.Emitting.Writer, the libxml2 xmlTextWriter model: emit a document with writeStartElement/writeAttribute/writeString/writeEndElement and friends, never building a tree. Escaping is extracted into a shared Emitting.Escaping helper used by both the writer and the serializer, so compact writer output is byte-identical to serializing the equivalent tree. Pretty mode indents element children (forward-only, so prefer compact for mixed content). Closes #32. Reimplemented from the libxml2 model; no upstream code copied. 6 tests; 90 total. |
||
|---|---|---|
| .. | ||
| Fixtures | ||
| DTDAttributeTests.swift | ||
| DTDIdentifierTests.swift | ||
| DTDTests.swift | ||
| DTDValidationTests.swift | ||
| EncodingTests.swift | ||
| ModelTests.swift | ||
| NamespaceTests.swift | ||
| ParsingTests.swift | ||
| SAXTests.swift | ||
| SerializerTests.swift | ||
| ValidationTests.swift | ||
| WriterTests.swift | ||
| XPathTests.swift | ||