Hi again,
I have two files and want to insert some elements in the file2 just after the similar set of elements in the file1. That is in the following two files I need to insert the element <ActorType> in the file2 just after the last <ActorType> element in file1 (I just want the output file to have similar nodes grouped together). Please note that I am copying some other elements from file2 to file 1 at the same time. I can insert this at the end as it is mentioned in the answer to my previous posting but this time I want the new elements to be copied just after the similar elements in the file1.
file1:
<rdf:RDF --goes here>
<SomeOtherElementsGoHere/>
<ActorType rdf:ID="xx"/>
<ActorType rdf:ID="xy"/>
<ActorType rdf:ID="xz"/>
<Transaction rdf:ID="vi34+vi94">
<Exchanges rdf:ID="ve107">
<hasEventTypes>
<TransferType rdf:ID="vp94">
<isEventType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">decrement</isEventType>
</TransferType>
</hasEventTypes>
<hasEventTypes>
<TransferType rdf:ID="vp29">
<ActorType rdf:resource="rightUsers"/>
<isEventType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">increment</isEventType>
</TransferType>
</hasEventTypes>
</Exchanges>
</Transaction>
<Transaction rdf:ID="vi345+vi945">
<Exchanges rdf:ID="ve1075">
<hasEventTypes>
<TransferType rdf:ID="vp945">
<isEventType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">decrement</isEventType>
</TransferType>
</hasEventTypes>
<hasEventTypes>
<TransferType rdf:ID="vp295">
<ActorType rdf:resource="rightUsers"/>
<isEventType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">increment</isEventType>
</TransferType>
</hasEventTypes>
</Exchanges>
</Transaction>
</rdf:RDF>
file2:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<ConversionType rdf:ID="TransmittingMusicStream">
<hasTransferedOrConversedResourceType rdf:resource="#MusicStream"/>
<isEventType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">decrement</isEventType>
<hasConversedFeature rdf:resource="OnAir"/>
<hasActorType rdf:resource="#RightUsers"/>
</ConversionType>
<ConversionType rdf:ID="GettingListenerAttention">
<hasTransferedOrConversedResourceType rdf:resource="#Attention"/>
<isEventType rdf:datatype="http://www.w3.org/2001/XMLSchema#string">increment</isEventType>
<hasConversedFeature rdf:resource="BeingPopularRadioStation"/>
<hasActorType rdf:resource="#RightUsers"/>
</ConversionType>
<ActorType rdf:ID="pq"/>
<ActorType rdf:ID="
pr"/>
</rdf:RDF>