我不太确定如何用语言来描述它而不会使它过于复杂,所以这基本上是我想要发生的事情:
我尝试这样做的原因是从具有用户必须登录的用户名和密码部分的网站创建RSS源.我没有看到RSS创建网站,使您能够这样做,这是为什么我试图这样做.但是,如果有人知道RSS网站可以让你这样做,那也会很棒.
谢谢你的帮助!
不希望是主观的,但我需要从XML源获取数据并将其转换为(X)HTML.根据我的理解,我可以使用PHP(或其他服务器端脚本),Javascript或XSLT来完成此操作.我的感觉是,使用XSLT更合适,因为它处理的是XML源,这就是XSLT存在的目的.我还看到它的优势在于,如果用户没有启用Javascript并且不会被限制为运行PHP(或其他服务器端脚本)的服务器,它仍然可以工作.我的假设是对的吗?
RSS提要也可以相同吗?
谢谢
我正在使用RSS提要,该文档包含一个特殊字符»
我猜测饲料编码不正确,但我无法改变.我想要覆盖它,或者只是用友好的东西替换有问题的字符.
using (Stream stream = response.GetResponseStream())
{
using (XmlReader reader = XmlReader.Create(stream))
{
try
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(reader); //<--- FAILS HERE
//parse the items of the feed
Run Code Online (Sandbox Code Playgroud)
...
在asp.net-mvc网站页面上,我想展示来自wordpress博客的最新博客文章.
与此网站类似,我想在我的网站上显示特定wordpress博客的最新几个更新.有点像谷歌读者我猜,但只是一个网站和长篇文章它应该只显示一点,并有一个"点击更多"链接.
是我在服务器上订阅并返回html的东西,还是我应该在客户端使用jquery做的事情?
我在django做了一个rss-feed,我希望把€变成€.我已经用它|escape来转义链接标签等.但不知何故|escape不适用于€.
现在有人有办法逃避吗?
我有一个基本的HTML模板:
<article>
<h3>Being a Freelance Designer</h3>
<p>Etiam porta sem malesuada magna euismod... <a href="#">Read more</a>
</p>
</article>
Run Code Online (Sandbox Code Playgroud)
我有一个RSS提要,http://www.justcode.us/feed,我试图提取每个RSS条目的标题和内容并创建一个<article>.
每个<article>都是RSS条目,<h3>标题<p>是身体.该<a>链接回到页的文章.
有人可以帮忙吗?
这是一个插件列表,无法正常工作,因为我需要从外部URL加载一个源(这些都使用AJAX):
这可能是一个愚蠢的问题,不是一个完全与编程相关的问题,而是在我努力学习的过程中承担责任.
如何通过在搜索框中输入网站URL来FEEDLY从网站上检索提要/新闻.
例如,我在搜索字段中输入了http://www.inspirationfeed.com,并且传递的AJAX调用/查询字符串是
http://cloud.feedly.com/v3/search/feeds?q=http%3A%2F%2Finspirationfeed.com%2F&n=20&ck=1381664838936
它返回了一个JSON作为响应
{"results":[{"deliciousTags":["Design","inspiration","Diseño","Web Design","webdesign","graphic design"],"lastUpdated":1381561980000,"score":27531.265625,"website":"http://inspirationfeed.com","title":"inspirationfeed.com","subscribers":1772,"language":"en","velocity":16.3,"feedId":"feed/http://feeds.feedburner.com/inspirationfeed/BTLD","description":"be inspired!"},{"deliciousTags":["DESIGN","Inspiration"],"lastUpdated":1381474380000,"score":48.0,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Inspiration","subscribers":48,"language":"en","velocity":4.7,"feedId":"feed/http://inspirationfeed.com/category/inspiration/feed/","description":"be inspired!"},{"deliciousTags":["design"],"lastUpdated":1381479900000,"score":294.7439270019531,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Articles","subscribers":27,"language":"en","velocity":11.7,"feedId":"feed/http://inspirationfeed.com/category/articles/feed/","description":"be inspired!"},{"deliciousTags":["Photography"],"lastUpdated":1381129620000,"score":17.0,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Photography","subscribers":17,"language":"en","velocity":0.7,"feedId":"feed/http://inspirationfeed.com/category/photography/feed/","description":"be inspired!"},{"deliciousTags":["Little Bit of Everything-Amatuer"],"lastUpdated":1381396020000,"score":109.16442108154297,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Blogging","subscribers":10,"language":"en","velocity":0.5,"feedId":"feed/http://inspirationfeed.com/category/articles/blogging/feed/","description":"be inspired!"}]}
Run Code Online (Sandbox Code Playgroud)
我理解的是什么
1)基于密钥deliciousTags,反馈生成#标签2)基于密钥score,以自上而下的顺序依次排列网站提供的不同提要/新闻URL
我不懂的是
1)如何通过只输入网站URL(资讯提供ly得到的消息饲料/ RSS网址示例: "feedId":"feed/http://feeds.feedburner.com/inspirationfeed/BTLD")
2)需要为这样的事物编写什么类型的Web服务.是否需要服务器端脚本来深入搜索相关网站并检索提要URL?可以使用JQuery/Javascript在客户端本身获取提要URL吗?
再次感谢您花时间阅读问题.
我使用doctype:XHTML Mobile Profile 1.2,XML version ="1.0 and Content-Type"application/xhtml + xml"
是否可以禁用或阻止<cite>标记出现在RSS提要中,因为我不断在页面本身上收到此错误.
error on line 24 at column 70: expected '>'
Below is a rendering of the page up to the first error.
Run Code Online (Sandbox Code Playgroud)
我正在使用来自其他网站的外部供稿,这不是我的控制或编辑.
我正在使用XSLT和ColdFusion文件来读取外部RSS文件,并在我的XSLT中以我想要的方式显示它,我已经到位disable-output-escaping="yes"以防止丢失代码显示在feed中.当这个标签不存在时,我的XSLT工作
我试图绕过它,但没有运气.实际上可以这样做吗?
CFM
<cfcontent type="application/xhtml+xml" reset="yes">
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<cfhttp method="Get" url="http://www.animenewsnetwork.com/news/rss.xml">
<cfset xmlInput = CFHTTP.FileContent>
<cfset MyXslFile = Expandpath("animenewsrss.xsl")>
<cffile action="READ" variable="xslInput" file="#MyXslFile#">
<cfset xmlOutput = XMLTransform(xmlInput, xslInput)>
<cfoutput>#xmloutput#</cfoutput>
Run Code Online (Sandbox Code Playgroud)
XSLT
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output …Run Code Online (Sandbox Code Playgroud) 有没有人知道如何使用网址请求发送If Modified Since标头?
我正在尝试获取状态代码,告诉我RSS页面是否已更新.
更新#1:我能够进行以下测试:
NSURL *url = [NSURL URLWithString:self.url];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request addValue:@"Tue, 18 Nov 2014 20:46:46 GMT" forHTTPHeaderField:@"If-Modified-Since"];
[NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
int responseCode = (int)[httpResponse statusCode];
NSLog(@"All headers: %@", [httpResponse allHeaderFields]);
NSLog(@"Status code:: %d", responseCode);
}];
Run Code Online (Sandbox Code Playgroud)
但奇怪的是,如果我删除整个iOS应用程序并运行它,我会得到304状态代码.但是,如果我注释掉我添加If-Modified-Since值的行并重新运行它 - 然后我得到200但是当我取消注释该行并重新运行它 - 那么304错误不会回来......这是一个200错误代码.解决304错误的唯一方法是删除我的iPhone设备上的整个应用程序.
有什么想法发生了什么?
当我尝试验证我的Feed时,W3C Feed Validation会返回此错误
Server returned [Errno 1] _ssl.c:504: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
我的Feed看起来很好,并在chrome和firefox上显示绿色挂锁.
我的饲料支持CloudFlare的通用ssl.
Feed网址:https://www.wphuman.com/feed/
我该如何解决错误?
谢谢!
更新: Feed在https://validator.w3.org/上运行良好,但不是https://validator.w3.org/feed/
rss ×10
jquery ×3
c# ×2
html ×2
javascript ×2
wordpress ×2
xml ×2
xslt ×2
asp.net-mvc ×1
client ×1
cloudflare ×1
coldfusion ×1
django ×1
escaping ×1
feed ×1
http-headers ×1
ios ×1
json ×1
objective-c ×1
php ×1
python ×1
unicode ×1