0
每當我通過actionscript 2中的XML對象加載任何博客頁面時,頁面中的幾乎所有內容都會奇蹟般地消失。我會假設,因爲頁面在xhtml中,這應該工作。這裏是我所得到的,如果我嘗試加載史蒂夫·耶格的博客:在ActionScript中的XML對象中加載Blogger頁面導致缺少標籤
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.google.com/2005/gml/b" xmlns:data="http://www.google.com/2005/gml/data" xmlns:expr="http://www.google.com/2005/gml/expr"><head><script type="text/javascript">(function() { var a=window;function f(e){this.t={};this.tick=function(d,b,c){var i=c?c:(new Date).getTime();this.t[d]=[i,b]};this.tick("start",null,e)}var g=new f;a.jstiming={Timer:f,load:g};try{a.jstiming.pt=a.external.pageT}catch(h){};a.tickAboveFold=function(e){var d,b=e,c=0;if(b.offsetParent){do c+=b.offsetTop;while(b=b.offsetParent)}d=c;d</script></head></html>
滾動到最後,你可以看到整個<body>
標籤丟失。對於如何解決這個問題,有任何的建議嗎?
編輯: 下面是一些簡單的代碼,所以你可以自己測試一下:
var foo:XML = new XML();
foo.ignoreWhite = true;
foo.onLoad = function(success:Boolean) {
trace(foo.toString());
}
foo.load("http://steve-yegge.blogspot.com/");
我當時使用的頁面並不是我的另一個程序員的博客。 – Anton 2009-07-22 13:37:57