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

creator->comment("For descriptive purposes only");
creator->processing_instruction("man2html", "style=visible");

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.


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.