How do you convert HTML into storage format programatically?

Assuming you have that HTML body-content of a particular macro, is there any way to convert that into its Storage Format counterpart? I’ve explored the APIs in XhtmlContent but did not find anything substantial.