Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

extract info from XML file

I have a xml file like that with one or more <item>s:

<questestinterop>
<item title="Standard Multiple Choice Item" ident="IMS_V01_I_QTILiteExample004">
<presentation label="QTILiteExample004">
<material>
<mattext>
Which one of the listed standards committees is responsible
for developing the token ring specification ?
</mattext>
</material>
<response_lid ident="MCb_01" rcardinality="Single" rtiming="No">
<render_choice>
<response_label ident="A">
<material><mattext>IEEE 802.3</mattext></material>
</response_label>
<response_label ident="B">
<material><mattext>IEEE 802.5</mattext></material>
</response_label>
<response_label ident="C">
<material><mattext>IEEE 802.6</mattext></material>
</response_label>
<response_label ident="D">
<material><mattext>IEEE 802.11</mattext></material>
</response_label>
</render_choice>
</response_lid>
</presentation>
</item>
</questestinterop>

It's a Standard Multiple Choice question(s)

I want to extract from this xml file the questions and choices :

Which one of the listed standards committees is responsible
for developing the token ring specification ?
IEEE 802.3
IEEE 802.5
IEEE 802.6
IEEE 802.11

How can a do that? Could you write me some code? I'm very new in working with xml. THNX!

PS: I'm using jdk 1.3
[1906 byte] By [wasssu] at [2007-11-11 8:47:35]