draig_hand
04-29-2009, 04:41 PM
I've viewed forum threads and cannot find relevant answer so - here goes from a newbie:
I have a large XML file containing Questions & Answers - part shown here:
- <QZ>
- <PL>
- <PLEA>
- <PLEA107 answer="">
<category>1</category>
<question>PLEA107</question>
<answer />
<answer />
<answer />
<answer />
</PLEA107>
- <PLEA108 answer="">
<category>1</category>
<question>PLEA108</question>
<answer />
<answer />
<answer />
<answer />
</PLEA108>
</PLEA>
- <PLNE>
- <PLNE107 answer="">
<category>1</category>
<question>PLNE107</question>
<answer />
<answer />
<answer />
<answer />
</PLNE107>
</PLNE>
- <PLOK> note the full xml file contains 5000+ lines
I need to show a Question and Answer table or form as part of my web page (between <td> </td>). The table/form needs to show one question along with the four possible answers.
Assuming I use PLEA107 to identify the node I want, how do I get Node PLEA107, and children, to present themselves in a formatted table on my page.
I am hoping that this can be done using just HTML, Javascipt, XML or PHP.
Hope you can help in some way.
I have a large XML file containing Questions & Answers - part shown here:
- <QZ>
- <PL>
- <PLEA>
- <PLEA107 answer="">
<category>1</category>
<question>PLEA107</question>
<answer />
<answer />
<answer />
<answer />
</PLEA107>
- <PLEA108 answer="">
<category>1</category>
<question>PLEA108</question>
<answer />
<answer />
<answer />
<answer />
</PLEA108>
</PLEA>
- <PLNE>
- <PLNE107 answer="">
<category>1</category>
<question>PLNE107</question>
<answer />
<answer />
<answer />
<answer />
</PLNE107>
</PLNE>
- <PLOK> note the full xml file contains 5000+ lines
I need to show a Question and Answer table or form as part of my web page (between <td> </td>). The table/form needs to show one question along with the four possible answers.
Assuming I use PLEA107 to identify the node I want, how do I get Node PLEA107, and children, to present themselves in a formatted table on my page.
I am hoping that this can be done using just HTML, Javascipt, XML or PHP.
Hope you can help in some way.