If an element attibute value is nil, skip generating that attribute value pair. Escape any #\> in xml-write, in an attribute value, in a value after an #\@ in element content, and in a string at top level in element content. All this is to obey the restriction that the #\> _must_ be escaped anywhere it appears in an XML document other than as the close marker of a CDATA section.
with-xml-generation binds *print-level* nil to protect against aserve worker thread binding. Missing (read-char) in xml-at caused ^((foo @,bar "boo")) to signal read-time error.