|
Subject: How to transform flat structure into hierarchical one? From: "Aleksandrs Jakovlevs" <Aleksandrs_Jakovlevs@xxxxxxxx> Date: Tue, 6 Jun 2000 15:45:54 +0200 |
I get a flat structure as a result of SQL query and want to transform it
into hierarchical structure.
E.g. initial XML could look like:
<record_set>
<record>
<house_id>h1</house_id>
<room_id>r1</room_id>
</record>
<record>
<house_id>h1</house_id>
<room_id>r2</room_id>
</record>
<record>
<house_id>h2</house_id>
<room_id>r3</room_id>
</record>
</record_set>
and the result of transformation could look like:
<house_list>
<house>
<id>h1</id>
<rooms>
<room>
<id>r1</id>
</room>
<room>
<id>r2</id>
</room>
</rooms>
</house>
<house>
<id>h2</id>
<rooms>
<room>
<id>r3</id>
</room>
</rooms>
</house>
</house_list>
Thanks.
Alex
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: How to transform flat structure, Kay Michael | Thread | RE: How to transform flat structure, Aleksandrs Jakovlevs |
| RE: Standalone Attributes?, Kay Michael | Date | Standalone Attributes?, Carlson, Thor |
| Month |