<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: [翻译]在Mozilla中使用XML和JavaScript</title>
	<atom:link href="http://www.marchbox.com/blog/user-xml-and-javascript-in-mozilla/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marchbox.com/blog/user-xml-and-javascript-in-mozilla/</link>
	<description>marchbox.com - 专注于Web前端</description>
	<pubDate>Sat, 19 May 2012 00:29:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: 糖果</title>
		<link>http://www.marchbox.com/blog/user-xml-and-javascript-in-mozilla/#comment-10361</link>
		<dc:creator>糖果</dc:creator>
		<pubDate>Mon, 03 May 2010 06:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.marchbox.com/?p=10#comment-10361</guid>
		<description>呵呵，明白了readXML函数在下面呢。完整的写法应该是：
function readXML(){
var companies=xmlDoc.getElementsByTagName("company");
var employees=companies[0].getElementsByTagName("employee");
document.write('');
document.write('idSexAge');
for(var i=0; i&#60;employees.length; i++) {
document.write('');
document.write('' + employees[i].getAttribute("id") + '');
document.write('' + employees[i].getAttribute("sex") + '');
document.write('' + employees[i].getAttribute("age") + '');
document.write('');
}
document.write('');

}</description>
		<content:encoded><![CDATA[<p>呵呵，明白了readXML函数在下面呢。完整的写法应该是：<br />
function readXML(){<br />
var companies=xmlDoc.getElementsByTagName(&#8221;company&#8221;);<br />
var employees=companies[0].getElementsByTagName(&#8221;employee&#8221;);<br />
document.write(&#8221;);<br />
document.write(&#8217;idSexAge&#8217;);<br />
for(var i=0; i&lt;employees.length; i++) {<br />
document.write(&#8221;);<br />
document.write(&#8221; + employees[i].getAttribute(&#8221;id&#8221;) + &#8221;);<br />
document.write(&#8221; + employees[i].getAttribute(&#8221;sex&#8221;) + &#8221;);<br />
document.write(&#8221; + employees[i].getAttribute(&#8221;age&#8221;) + &#8221;);<br />
document.write(&#8221;);<br />
}<br />
document.write(&#8221;);</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 糖果</title>
		<link>http://www.marchbox.com/blog/user-xml-and-javascript-in-mozilla/#comment-10359</link>
		<dc:creator>糖果</dc:creator>
		<pubDate>Mon, 03 May 2010 06:08:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.marchbox.com/?p=10#comment-10359</guid>
		<description>你好上述代码中readXML函数没有定义呀，在firefox中没函数可执行呀</description>
		<content:encoded><![CDATA[<p>你好上述代码中readXML函数没有定义呀，在firefox中没函数可执行呀</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 祭师α</title>
		<link>http://www.marchbox.com/blog/user-xml-and-javascript-in-mozilla/#comment-1232</link>
		<dc:creator>祭师α</dc:creator>
		<pubDate>Sat, 05 Jan 2008 23:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.marchbox.com/?p=10#comment-1232</guid>
		<description>你好！我化了一晚研究这篇文章，发现程序代码有很多问题。例如：
xmlDoc.onload = readXML;
这一句在FireFox中不能通过。还有这一句：
var noOfCompanyTags = xmlDoc.getElementsByTagName("company").length;
在FireFox中结果显示noOfCompanyTags的值为零，原因不明。已经按照你的步骤和代码去做了，还是不行。可以的话，帮我解答一下，谢谢。</description>
		<content:encoded><![CDATA[<p>你好！我化了一晚研究这篇文章，发现程序代码有很多问题。例如：<br />
xmlDoc.onload = readXML;<br />
这一句在FireFox中不能通过。还有这一句：<br />
var noOfCompanyTags = xmlDoc.getElementsByTagName(&#8221;company&#8221;).length;<br />
在FireFox中结果显示noOfCompanyTags的值为零，原因不明。已经按照你的步骤和代码去做了，还是不行。可以的话，帮我解答一下，谢谢。</p>
]]></content:encoded>
	</item>
</channel>
</rss>

