金曜日, 11月 17, 2006

BloggerのFeedのcontent-type

XMLHttpRequestでresponseXMLを使って
xmlファイルを取得しようとすると
Firefoxでは取得できたのにIEでは取得できなかった
なぜ取得できないか結構悩んだけど
ここをみたら原因がわかった
ajax - Content-Type: 許容判定

Bloggerの各xmlのcontent-typeが
rssは
application/rss+xml
atomは
application/atom+xml
となっていて
IEではcontent-typeが
text/xml

application/xml
でないとresponseXMLを使って取得することができないらしい

あきらめてresponseTextを使おう…

0 件のコメント: