What is the best way to parse XHTML documents that contain DOCTYPE like
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Currently, even though I have set the response-type on the MPGW to be non-xml it fails to parse the XHTML document with the following error:
Incomplete markup or missing document element at offset 0 of http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
I simply want to access the HTTP status response header but cannot do so as it fails to parse the XHTML.
This main reason is that the server is returning a 401 together with the XHTML payload where it says unauthorized access.
Thanks in advance.