i would not use html(5). XHTML? perhaps. but try to find 3 parsers, which parse html in the same way and not segfaulting.
It's not possible. HTML is worse. You need at least something, which on parsing does not segfault.