Recognizing html document type

Has anyone ever receive html format as the payload and been successfully creating a document type for it in TN? Do you define the document as an xml or ff?

xmlStringToXMLNode can process HTML–if the HTML is well-formed.

Parsing HTML is troublesome because its syntax is fairly loose and browsers try to accommodate missing end tags, quotes, etc. “But it works when I view it in Internet Explorer” will be the statement when a document is rejected when it cannot be parsed for some reason.

If at all possible, I’d recommend avoid using HTML as payload.

Thanks Rob and I totally agree with you. But the customer is adamant with sending us both version in the payload (xml and html). So, when TN receive the transaction, how do I properly have TN recognize the document type?

What I’m trying to accomplish is to have separate processing for the xml and html transaction. The customer is adamant about sending us both copies so when I receive the one with html in TN, I basically will not do anything with it but the xml one I will want to process it.