Creating other kinds of XML nodes, and other writer lock methods

creator->comment("For descriptive purposes only");
creator->text("overpayment");
creator->cdata("<text>");
creator->processing_instruction("man2html", "style=visible");
creator->entity("XML");

comment() creates an XML comment. text() creates a text node, and cdata() create a CDATA text node. A text() overload for all numeric types supported by std::to_chars creates a text node with the text representation of the numeric value. processing_instruction() creates an XML processing instruction. Its first parameter is the processor name, the second parameter is the instruction. entity() creates a custom entity reference.

creator->set_base("http://www.example.com");
creator->set_lang("EN");
creator->set_space_preserve("<text>");

set_base() sets the xml::base attribute of the writer lock's current node. The URI may be specified as a literal string or as a x::uriimpl. set_lang() sets the xml::lang attribute, and set_space_preserve() sets the xml::space_preserve attribute. In all cases the writer lock must be positioned on an existing XML element node. These methods can be invoked directly on a writer lock, or as a creator factory's methods, in which case they return a reference to the same creator factory.