I assume that by "URL request" you actually mean a HTTP request. But they are never XML or HTML, they are just plain text.
So I suspect that you're actually talking about the content type of the HTTP response, rather than the request. In that case you can just look at the content type header. If it's "text/html" then the body is HTML, if it's "text/xml" then the body is XML.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: xml/html detection script
by davorg
in thread xml/html detection script
by slloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |