URGENT - XML with n numbers of nested categories
Posted: Mon Jul 09, 2007 3:02 am
feyd | Please use
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a XML which can have n number of nested categories and subcategories. The problem is node names are all same for each level. Now can any please tell how can I display names with relation between each?
Or how will loop work or any other method of getting values?
I mean display should be:
Category 1
- Subcategory
- More Subcategory
Category 2
- Subcategory
- More Subcategory
and so on....
The XML I am having is something like this:
[syntax="xml"]
<taxonomy>
<form id="96451" name="Cars">
<taxonomy>
<form id="96477" name="Auto Parts and Accessories"></form>
<form id="96621" name="Automotive Security Systems"></form>
<form id="96478" name="Motorcycle Parts and Accessories"></form>
<form id="96456" name="New Cars">
<form id="96457" name="Used Cars"></form>
</taxonomy>
</form>
<form id="2010" name="Clothing and Accessories">
<taxonomy>
<form id="31515" name="Clothing"></form>
<form id="68185" name="Luggage"></form>
<form id="96602" name="Shoes"></form>
</taxonomy>
</form>
</taxonomy>
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]