<?php
$file_handle = fopen("../sucai/1/Listening/questions.xml", "r");
while (!feof($file_handle)) {
$string= fgets($file_handle);
}
fclose($file_handle);
$xml_array=simplexml_load_file('../sucai/1/Listening/questions.xml'); //将XML中的数据,读取到数组对象中
$part = $xml_array->part ;
$passage = $part->passage;
$pictures = $passage->pictures;
$picture = $pictures->picture;
$question = $passage->question;
print_r($question[1][Content]);
echo $question[1][Content][0];
?>
<?xml version="1.0" encoding="UTF-8"?>
<parts partCount="2" questionCount="34" passageCount="6">
<part NO="1" lastPassageIndex="3" partDirection="Listening_1_intro.mp3" timeLimitation="10:00" questionCount="17">
<passage NO="1" Content="Listening_Passage_1.mp3" lastQuestionIndex="5" passageName="tpo1-conversation1.txt">
<pictures pictureCount="1">
<picture NO="1" Start="00:00" pictureName="listen010101.jpg"></picture>
</pictures>
<question NO="1" Content="Listening_1.mp3"></question>
<question NO="2" Content="Listening_2.mp3"></question>
<question NO="3" Content="Listening_3.mp3"></question>
<question NO="4" Content="Listening_4.mp3"></question>
<question NO="5" Content="Listening_5.mp3"></question>
</passage>
<passage NO="2" Content="Listening_Passage_2.mp3" lastQuestionIndex="11" passageName="tpo1-lecture1.txt">
<pictures pictureCount="6">
<picture NO="1" Start="00:00" pictureName="listen010201.jpg"></picture>
<picture NO="2" Start="00:04" pictureName="listen010202.jpg"></picture>
<picture NO="3" Start="00:36" pictureName="listen010203.jpg"></picture>
<picture NO="4" Start="00:59" pictureName="listen010204.jpg"></picture>
<picture NO="5" Start="01:39" pictureName="listen010205.jpg"></picture>
<picture NO="6" Start="03:46" pictureName="listen010206.jpg"></picture>
</pictures>
<question NO="6" Content="Listening_6.mp3"></question>
<question NO="7" Content="Listening_7.mp3"></question>
<question NO="7" Content="Listening_7.mp3"></question>
<question NO="8" Content="Listening_8.mp3"></question>
<question NO="9" Content="Listening_9.mp3"></question>
<question NO="10" Content="Listening_10.mp3"></question>
<question NO="11" Content="Listening_11.mp3"></question>
</passage>
<passage NO="3" Content="Listening_Passage_3.mp3" lastQuestionIndex="17" passageName="tpo1-lecture2.txt">
<pictures pictureCount="6">
<picture NO="1" Start="00:00" pictureName="listen010301.jpg"></picture>
<picture NO="2" Start="00:06" pictureName="listen010302.jpg"></picture>
<picture NO="3" Start="00:38" pictureName="listen010303.jpg"></picture>
<picture NO="4" Start="01:28" pictureName="listen010304.jpg"></picture>
<picture NO="5" Start="01:48" pictureName="listen010305.jpg"></picture>
<picture NO="6" Start="02:59" pictureName="listen010306.jpg"></picture>
</pictures>
<question NO="12" Content="Listening_12.mp3"></question>
<question NO="13" Content="Listening_13.mp3"></question>
<question NO="14" Content="Listening_14.mp3"></question>
<question NO="15" Content="Listening_15.mp3"></question>
<question NO="16" Content="Listening_16.mp3"></question>
<question NO="17" Content="Listening_17.mp3"></question>
</passage>
</part>
<part NO="2" lastPassageIndex="6" partDirection="Listening_1_intro.mp3" timeLimitation="10:00" questionCount="17">
<passage NO="4" Content="Listening_Passage_4.mp3" lastQuestionIndex="22" passageName="tpo1-conversation2.txt">
<pictures pictureCount="1">
<picture NO="1" Start="00:00" pictureName="listen010401.jpg"></picture>
</pictures>
<question NO="18" Content="Listening_18.mp3"></question>
<question NO="19" Content="Listening_19.mp3"></question>
<question NO="20" Content="Listening_20.mp3"></question>
<question NO="21" Content="Listening_21.mp3"></question>
<question NO="22" Content="Listening_22.mp3"></question>
</passage>
<passage NO="5" Content="Listening_Passage_5.mp3" lastQuestionIndex="28" passageName="tpo1-lecture3.txt">
<pictures pictureCount="5">
<picture NO="1" Start="00:00" pictureName="listen010501.jpg"></picture>
<picture NO="2" Start="00:05" pictureName="listen010502.jpg"></picture>
<picture NO="3" Start="00:19" pictureName="listen010503.jpg"></picture>
<picture NO="4" Start="01:24" pictureName="listen010504.jpg"></picture>
<picture NO="5" Start="01:48" pictureName="listen010505.jpg"></picture>
</pictures>
<question NO="23" Content="Listening_23.mp3"></question>
<question NO="24" Content="Listening_24.mp3"></question>
<question NO="25" Content="Listening_25.mp3"></question>
<question NO="26" Content="Listening_26.mp3"></question>
<question NO="27" Content="Listening_27.mp3"></question>
<question NO="28" Content="Listening_28.mp3"></question>
</passage>
<passage NO="6" Content="Listening_Passage_6.mp3" lastQuestionIndex="34" passageName="tpo1-lecture4.txt">
<pictures pictureCount="5">
<picture NO="1" Start="00:00" pictureName="listen010601.jpg"></picture>
<picture NO="2" Start="00:05" pictureName="listen010602.jpg"></picture>
<picture NO="3" Start="00:16" pictureName="listen010603.jpg"></picture>
<picture NO="4" Start="01:43" pictureName="listen010604.jpg"></picture>
<picture NO="5" Start="03:24" pictureName="listen010605.jpg"></picture>
</pictures>
<question NO="29" Content="Listening_29.mp3"></question>
<question NO="30" Content="Listening_30.mp3"></question>
<question NO="31" Content="Listening_31.mp3"></question>
<question NO="32" Content="Listening_32.mp3"></question>
<question NO="33" Content="Listening_33.mp3"></question>
<question NO="34" Content="Listening_34.mp3"></question>
</passage>
</part>
</parts>