* @return DOM document.
*/
public static Document parseMessagePayload(String messagePayload) {
LSParser parser = createLSParser();
setParserConfigParameter(parser, VALIDATE_IF_SCHEMA, true);
setParserConfigParameter(parser, RESOURCE_RESOLVER, new LSResolverImpl(domImpl));
setParserConfigParameter(parser, ELEMENT_CONTENT_WHITESPACE, false);
LSInput receivedInput = createLSInput();
try {
Charset charset = getTargetCharset(messagePayload);