<?xml version="1.0" encoding="UTF-8"?>
<assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" identifier="Tes-1" title="Tes 1" toolName="tao" toolVersion="2.6.7" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1.xsd">
<timeLimits maxTime="180" allowLateSubmission="false"/>
<testPart identifier="TesBagian-1" navigationMode="linear" submissionMode="individual">
<itemSessionControl maxAttempts="0" showFeedback="false" allowReview="true" showSolution="false" allowComment="false" allowSkipping="true" validateResponses="false"/>
<timeLimits maxTime="180" allowLateSubmission="false"/>
<assessmentSection identifier="subBagian-1" required="true" fixed="false" title="Sub Bagian 1" visible="true" keepTogether="true">
<assessmentItemRef identifier="item-1" required="false" fixed="false" href="http://localhost/tao_dev/icat.rdf#i147252537452611434"/>
</assessmentSection>
<assessmentSection identifier="assessmentSection-1" required="false" fixed="false" title="Sub Bagian 2" visible="false" keepTogether="true"/>
</testPart>
<testPart identifier="TesBagian-2" navigationMode="linear" submissionMode="individual">
<assessmentSection identifier="subBagian-2" required="false" fixed="false" title="Sub Bagian 1" visible="false" keepTogether="true"/>
<assessmentSection identifier="assessmentSection-2" required="false" fixed="false" title="Sub Bagian 2" visible="false" keepTogether="true"/>
</testPart>
</assessmentTest>
所以我想要做的是從testPart子的「標識符」屬性和assessmentSection子標識符的「標識符」屬性中獲取值。我已經加載了xml文件,但我不知道該怎麼做。如何從這個XML元素獲取屬性?
的SimpleXML搖鈴? –
請告訴我們您的來源。 – ThW