Reversing the order

I'm trying to export a list of mp3 tags into a template I've built for an XML file. The problem is that I need to reverse the order of the loop so they appear in the proper order. I've searched the forums and found a $reverse function, but I admit, I don't know where it goes. So for example:

$filename(New_export_file.xml,utf-8)<?xml version="1.0" encoding="UTF-8"?>
        <title>Real FamilyLife with Dennis Rainey</title>
        <description>Life may be hard... but the precepts of the LORD are right, giving joy to the heart (Psalm 19:8). Real FamilyLife with Dennis Rainey, provides godly wisdom for life&apos;s toughest questions.</description>
            <enclosure url="" length="%_file_size_bytes%" type="audio/mpeg"/>

Where shall I put the $reverse function? And would it look like $reverse(%_filename%)? Thanks in advance for any help!

The Mp3tag scripting function $reverse(x) reverses the order of the characters in the string x.
See also ...

Do you want to get file names sorted in descending order in an export script?
What's what you get when the file names are sorted in descending order?

The Mp3tag export scripting function $loop() ... $loopend() does only ascending sorting.