in reply to Compare 2 XML files

I'd hash the ids from the file that's shorter, then iterate over the larger file and check the presence of the id in the hash. For example, if events.xml is shorter, you can use the following in xsh, a wrapper around XML::LibXML :
open 'events.xml' ; $ssrid := hash normalize-space(value[normalize-space(preceding::name[1])='SSRI +D']) /event_list/event ; open 'application.xml' ; for /application_list/application { if xsh:lookup('ssrid', @id) echo @id ; }
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,