thestonefox
Technical User
Hi all
I have an xml document that contains n level of nodes and i want to display a html unordered list from them
the xml looks like this
<nodes>
<node>
<data>Node A</data>
<node>
<data>Node A1</data>
</node>
<node>
<data>Node A2</data>
</node>
<node>
<data>Node A3</data>
</node>
</node>
<node>
<data>Node B</data>
<node>
<data>Node B1</data>
</node>
<node>
<data>Node B2</data>
<node>
<data>Node B2i</data>
</node>
<node>
<data>Node B2ii</data>
</node>
</node>
<node>
<data>Node B3</data>
</node>
</node>
</nodes>
And i want it to output as an html unordered list like this.
* Node A
* Node A1
* Node A2
* Node A3
* Node B
* Node B1
* Node B2
* Node B2i
* Node B2ii
* Node B3
I've found ways of appending the nodes as i go down so i can print out the list and give the impression of indendation, but i cannot figure out how to create the relevant recursive xpath queries to display the ul and li tags correctly.
Can anyone help?
Thanks
I have an xml document that contains n level of nodes and i want to display a html unordered list from them
the xml looks like this
<nodes>
<node>
<data>Node A</data>
<node>
<data>Node A1</data>
</node>
<node>
<data>Node A2</data>
</node>
<node>
<data>Node A3</data>
</node>
</node>
<node>
<data>Node B</data>
<node>
<data>Node B1</data>
</node>
<node>
<data>Node B2</data>
<node>
<data>Node B2i</data>
</node>
<node>
<data>Node B2ii</data>
</node>
</node>
<node>
<data>Node B3</data>
</node>
</node>
</nodes>
And i want it to output as an html unordered list like this.
* Node A
* Node A1
* Node A2
* Node A3
* Node B
* Node B1
* Node B2
* Node B2i
* Node B2ii
* Node B3
I've found ways of appending the nodes as i go down so i can print out the list and give the impression of indendation, but i cannot figure out how to create the relevant recursive xpath queries to display the ul and li tags correctly.
Can anyone help?
Thanks