XML Parsing: a step beyond

Hallo everybody! :slight_smile:
I’ve used the xml parsing method showed in this tutorial and it has worked perfectly and saved me from many headaches.
Now I have a problem: I am dealing with a xml that is a level deeper and I don’t know what to do.
Starting from something like this:


<fruit>
         <[COLOR="#ff0000"]Apples[/COLOR]>
                <item>
                        <name>[COLOR="Blue"]Gala[/COLOR]</name>
                        <color>[COLOR="YellowGreen"]red[/COLOR]</color>
                </item>
                <item>
                        <name>Ginger Gold</name>
                        <color>yellow</color>
                </item>
        </apples>
        <Pears>
                <item>
                        <name>European Pear</name>
                        <color>brown</color>
                </item>
                <item>
                        <name>nashi pear</name>
                        <color>yellow</color>
                </item>
        </pears>
</fruit>

I want to get this:


<dl>
      <dt>[COLOR="Red"]Apples[/COLOR]</dt>
      <dd>The [COLOR="Blue"]Gala[/COLOR] fruit is [COLOR="YellowGreen"]red[/COLOR]</dd>
      <dd>The ... fruit is ...</dd>
      <!-- and so on -->

      <dt>Pears</dt>
      <dd>The ... fruit is ...</dd>
      <dd>The ... fruit is ...</dd>
</dl>

But I don’t know how!!
Is there someone that can help me?
Thank you!!