XSL自动运行并生成HTML页面

时间:2015-11-16 13:47:50

标签: c# httpwebrequest

我试图在这个网站上提出请求:

http://alt1040.com/feed

使用Fiddler,我看到它有2个重定向并将我发送到带有XML的页面。

当我使用HttpWebRequest在此页面中运行GET时,它会返回一个HTML。似乎HttpWebRequest正在组合XSL。

有什么方法可以禁用此选项吗?

提琴手结果:

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="***/~d/styles/rss2full.xsl***"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.hipertextual.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss" version="2.0"><channel>  <title>Hipertextual</title>  <link>http://hipertextual.com</link>    <description>La intersección de la tecnología, la ciencia y las humanidades</description>

HttpWebRequest结果:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Hipertextual - powered by FeedBurner</title><link href="//feedburner.google.com/fb/lib/stylesheets/undohtml.css" rel="stylesheet" type="text/css" media="all">

为什么我无法获取XML?有没有办法获得这个XML结果?

上次GET信息:

GET http://feeds.hipertextual.com/alt1040 HTTP/1.1
Host: feeds.hipertextual.com
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like     Gecko) Chrome/46.0.2490.86 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4,es;q=0.2
Cookie: __cfduid=...
If-None-Match: ...
If-Modified-Since: Mon, 16 Nov 2015 13:29:30 GMT

非常感谢!

0 个答案:

没有答案