to Xml
Converts the given Rht to XML String.
The value is rendered through logicalValue first, same as JS toXML reads it back through parseAttrValue: a JSON-encoded string (what a JS peer stores for a string attribute) unwraps to its bare form, while an object/number/boolean/malformed value stays exactly as stored. Both the key and the (now-unwrapped) value are peer-chosen, so each is escaped before interpolation: unescaped, a " closes the attribute and a < opens an element, letting a peer forge markup into every reader's rendered tree (port JS document/crdt/tree.ts escapeXMLAttr, 6932da6a, #1447) -- the XML half of the forging toJson already closes for the JSON encoding via escapeString.