- cdataAsText emits a CDATA section's content as escaped text instead of
a <![CDATA[ ... ]]> section.
- asciiOnly escapes every non-ASCII character as a numeric character
reference, so the output is pure ASCII (libxml2's character-reference
encoding).
Both apply to the Serializer and the incremental Writer through the
shared Escaping rules.
Closes#91
Broaden the serializer and writer options from the audit:
- attributeQuote selects single or double quotes; the active quote is
escaped in values (apostrophe as ' in single-quote mode).
- lineEnding controls the inserted newline (set to CRLF for \r\n output).
- xml:space=preserve suppresses pretty-print indentation for an element
and its subtree; xml:space=default re-enables it.
- Writer gains writeStartElementNS(prefix:localName:namespaceURI:) and
writeNamespace(prefix:uri:), so callers no longer hand-format prefixes
and xmlns attributes.
CDATA-vs-escape and entity re-escaping strategies are left as a
follow-up; the current escaping is the safe default.
Closes#91
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.