Hi,
I am using the method
getElementsByTagName("")....
This works except the problem is my XML schema/file has some recursive tags,
I have a <question> element which can have an <answer> or another <question>.
When parsing the XML file I want to be able to get a list of sub questions for a given question, but only if it is a direct child of that question.
So if i have:
<question>
<text>q1</text>
<question>
<text>q2</text>
<question>
<text>q3</text>
</question>
</question>
</question>
If I'm dealing with the "q1" question I want only "q2" but not "q3". Whereas getElementsByTagName will take both q2 and q3. How can I achieve this.
Thanks