[Opa] how to parse a string into xhtml?

Owen Gunden ogunden at phauna.org
Sat Mar 3 20:29:33 UTC 2012

I would like to parse a string into xhtml, such that
Xhtml.to_readable_string does not drop it.

Xhtml.to_readable_string drops "unsafe" xml, thus:

   Xhtml.to_readable_string(Xhtml.of_string_unsafe("<p>poof</p>")) == ""

But I don't want it to be xml text either:

   Xhtml.to_readable_string(Xhtml.of_string_unsafe("<p>poof</p>")) ==

What I'm looking for is a function my_of_string such that:

  Xhtml.to_readable_string(my_of_string("<p>poof</p>")) == "\npoof\n"

More information about the Opa mailing list