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!!