f_atencia 0 Junior Poster in Training

Say I have an XML file as such:
<contacts>
<contact id="1">
<name>Steven</name>
<address>Here</address>
<phone>11111111</phone>
</contact>
<contact id="2">
<name>John</name>
<address>There</address>
<phone>22222222</phone>
</contact>
</contacts>
...etc.

How can I transform that to HTML with XSLT so that it can be a collapsable/expandable tree? For example, If I click a button that shows contact{@id="1"] button, it will display Steven's details or John's details if I select a button with id=2?

I'm just new at this and any help would be greatly appreciated.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.