Hey Lewis,
I think what I'd do is:
1) Scrape the file 1 for the replacement date lines.
2) Paste them into this script in place of the dummy $input items:
#!/usr/bin/env perl -sw
use v5.010;
my $input = '
<date>Tue, 01 May 2021 17:12:26 -0600</date>
<date>Tue, 02 May 2021 17:12:26 -0600</date>
<date>Tue, 03 May 2021 17:12:26 -0600</date>
';
$input =~ s!\A\s+|\s+$!!g;
my @array = split(/\n/, $input);
my $counter = 0;
while (<>) {
if (m!<date>.+?</date>!) {
s!<date>.+?</date>!$array[$counter]!;
$counter++;
print;
} else {
print;
}
}
3) Open the file where the replacements are to take place to be frontmost in BBEdit.
4) Run the script.
It works well on my test file (only lightly tested).
If I had more time and was feeling adventurous I'd do basically the same thing, except:
1) My user-input would be the source and destination file paths.
2) I'd read the source file date items directly into an array.
3) Then I'd open the destination file and do the processing in-place.
I haven't played with reading and writing files for a while, so that's more than I want to tackle at the moment.