kikko
06-04-2008, 06:27 PM
Hi Everyone,
Can anyone help give ideas on how to solve recursive elements please?
eg. questions can have subquestions and subquestions can have sub-subquestions and so on) example below:
<survey>
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
</question>
</questions>
</question>
</questions>
</survey>
i tried this:
<!ELEMENT questions (questions|question)*> but it only works with this(which is what i'm not after):
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
</question>
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
</question>
</questions>
</questions>
looking forward to your reply
thanks
Can anyone help give ideas on how to solve recursive elements please?
eg. questions can have subquestions and subquestions can have sub-subquestions and so on) example below:
<survey>
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
</question>
</questions>
</question>
</questions>
</survey>
i tried this:
<!ELEMENT questions (questions|question)*> but it only works with this(which is what i'm not after):
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
</question>
<questions>
<question>
<questionText></questionText>
<answers>
<answer></answer>
</answers>
</question>
</questions>
</questions>
looking forward to your reply
thanks