XML Development

Moderators: None (Apply to moderate this forum)
Number of threads: 252
Number of posts: 451

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Help transforming XML Posted by pandev on 12 Nov 2008 at 12:41 AM
Hi, I would like to transform the following XML structure.

<Region>
<description>RegionDesc</description>
<Group>
<description>GroupDesc</description>
<id>1</id>
<Events>
<Event>
<eventID>100</eventID>
</Event>
<Event>
<eventID>200</eventID>
</Event>
</Events>
</Group>
<Group>
<description>GroupDesc</description>
<id>2</id>
<Events>
</Events>
</Group>
</Region>

I would like to be able to "flatten" the view so that the number of events are stored in an attribute. I'd also like to make the parent Region's description an attribute to each Group.

<Group>
<region>RegionDesc</region>
<description>GroupDesc</description>
<id>1</id>
<eventCount>2</eventCount>
</Group>
<Group>
<region>RegionDesc</region>
<description>GroupDesc</description>
<id>2</id>
<eventCount>0</eventCount>
</Group>

Any help would be greatly appreciated!!



 

Recent Jobs