<code>
<?xml version="1.0" encoding="iso-8859-1" ?>
<projects>
<project>
<flag>1</flag>
<name>Project 1</name>
<descp> Short description. </descp>
<rating> 6 </rating>
<link> URL1 </link>
</project>
<project>
<flag>1</flag>
<name>Project 2</name>
<descp> Short description. </descp>
<rating> 9 </rating>
<link> URL2 </link>
</project>
<project>
<flag>1</flag>
<name>Project 3</name>
<descp> Short description. </descp>
<rating> 4 </rating>
<link> URL3 </link>
</project>
<project>
<flag>1</flag>
<name>Project 4</name>
<descp> Short description. </descp>
<rating> 5 </rating>
<link> URL4 </link>
</project>
</projects>
</code>
我是javascript的新手,在使用getElementsbyTagName(“project”)之后我遇到了问题,我得到了一系列项目标签。但现在我很困惑如何访问子标签以从这个XML获取我需要的数据?