When using SML/NJ library's HTML4 library, how do I convert the Standard ML representation of HTML4 into a string?
For example, if I have the HTML representation below, what function can I use to get a string similar to <html><head><title>Example</title></head><body><h1>Hello!</h1></body></html>
?
(* CM.make "$/html4-lib.cm"; *)
open HTML4;
val myHTML = HTML {
version=NONE,
head=[Head_TITLE ([], [PCDATA "Example"])],
content=BodyOrFrameset_BODY (BODY ([], [
BlockOrScript_BLOCK (H1 ([], [CDATA [PCDATA "Hello!"]]))]))
};
(SML/NJ version: 110.99.2)