URLConnection Automatically applies XSL?
Hi,
I need to make a URLConnection to a remote web page and read it's contents. The contents of the web page I will be reading are well formed XML but the page has an xsl instruction at the top, like so:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/layout/xxx-sheet.xsl"?>
When I read the contents of the URLConnection to that page (HttpURLConnection) what I'm actually getting is thepost-transformation XHTML not the plain XML.
Is there a way to circumvent this behavior so that I get the contents of the web page pre-transformation? Either some attribute of the URL or URLConnection or do I have to write my own subclass of a URLConnection, ContentHandler, ContentHandlerFactory or something like that?
The only other way I can think of to solve this problem is to manually make a Socket connection on port 80 to the IP of the web site, then manually read/write the HTTP request/response. I really don't want/think I should have to get that low into the weeds in order to solve this problem.
Any tips/suggestions are appreciated.

