[Bbs2ch-cvs 447] [429] [04_BRANCH] XML の読み込みに XMLHttpRequest を使うようにした

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2008年 7月 5日 (土) 03:43:02 JST


Revision: 429
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=429
Author:   flyson
Date:     2008-07-05 03:43:02 +0900 (Sat, 05 Jul 2008)

Log Message:
-----------
[04_BRANCH] XML の読み込みに XMLHttpRequest を使うようにした 

Modified Paths:
--------------
    branches/bbs2chreader/04_BRANCH/chrome/content/bbs2chreader/bbsmenu/page.js


-------------- next part --------------
Modified: branches/bbs2chreader/04_BRANCH/chrome/content/bbs2chreader/bbsmenu/page.js
===================================================================
--- branches/bbs2chreader/04_BRANCH/chrome/content/bbs2chreader/bbsmenu/page.js	2008-07-04 18:41:20 UTC (rev 428)
+++ branches/bbs2chreader/04_BRANCH/chrome/content/bbs2chreader/bbsmenu/page.js	2008-07-04 18:43:02 UTC (rev 429)
@@ -52,9 +52,11 @@
 	var ioService = Components.classes["@mozilla.org/network/io-service;1"]
 				.getService(Components.interfaces.nsIIOService);
 	var bbsMenuXMLURL = ioService.newFileURI(gBbsMenuXMLFile);
-	var bbsmenuDoc = document.implementation.createDocument("", "", null);
-	bbsmenuDoc.async = false;
-	bbsmenuDoc.load(bbsMenuXMLURL.spec);
+	var httpReq = new XMLHttpRequest();
+	httpReq.open("GET", bbsMenuXMLURL.spec, false);
+	httpReq.send(null);
+	var bbsmenuDoc = httpReq.responseXML;
+	delete httpReq;
 
 		// 外部板
 	var	outsidexmlFile = gBbs2chService.getDataDir();
@@ -65,9 +67,11 @@
 		gBbs2chService.writeFile(outsidexmlFile.path, outsideContent, false);
 	}
 	var outsideXMLURL = ioService.newFileURI(outsidexmlFile);
-	var outsideDoc = document.implementation.createDocument("", "", null);
-	outsideDoc.async = false;
-	outsideDoc.load(outsideXMLURL.spec);
+	var httpReq = new XMLHttpRequest();
+	httpReq.open("GET", outsideXMLURL.spec, false);
+	httpReq.send(null);
+	var outsideDoc = httpReq.responseXML
+	delete httpReq;
 
 	// outsideDoc.documentElement.appendChild(outsideDoc.createElement("separator"));
 


bbs2ch-cvs メーリングリストの案内
Zurück zum Archiv-Index