If I have an xml document that looks like this:
<Top>
<Child>
<SomeElement />
<AChildRecord><Data></Data><MoreData></MoreData><AChildRecord>
<SomeOtherElement />
</Child>
<Child>
<SomeElement />
<AChildRecord><Data></Data><MoreData></MoreData><AChildRecord>
<SomeOtherElement />
</Child>
</Top>
My problem is that the <AChildRecord> is the same for all <Child> record. But I only want to map it once. E.g you get something like this:
MappedAChildRecord
MappedChild1
MappedChild2
MappedChild3..
Not like this (the way I get it now):
MappedAChildRecord
MappedAChildRecord
MappedAChildRecord
MappedChild1
MappedChild2
MappedChild3..
I don't know if I'm explaining this well enough. But basically in the xml format I want to transform to <Child> and <AChildRecord> are sibblings. And since I know AChildRecord will be the same for ALL <Child> I only want it once, while I want all of the <Child> tags. Does that make sense?