Match source txt/ csv/ xml files by name or relative path per media file

I'm wanting to import tags for Movie XML Schema formatted files but I'm unsure how to do this in a batch way or if it is possible using the convert text to tag function.

I have processed movie media with media companion and have xml formatted files with tag data inside. the program structures directory per media file with xml, and thumb nails inside.
I would like to import this into tags.

The converter tool to import files via csv or txt assumes one has a single file with all the content to put into tags not la list of files with tags per each media file (I think).
Can I pull tags from separate files relative to the directory where the files are stored in a batch way?

Basically, I'd like to match the source txt/ csv/ xml by name or relative path per media file.

I think a file parser that can parse local folder structures for the text to tag function would be required unless I'm missing something.

From my understanding ill have to put all the tags from every file into a single file or specify one file at a time to import tags.

More info here on the xml format:
Movie XML Schema - Media Companion Documentation

You could start reading here:

You will find the syntax of text files (no XML!) as well as you can match files from the text file to Mp3tag’s File List.

There is also an action that imports the whole contents of a given file into a single field:

So, this action could be a way to get the data from varying files into a user-defined field and then strip all the extra parts from the real data and import the field data into fields, perhaps with "Guess value".

it looks like I can use place holders to import a complete file's contents into a single field using actions?

something like this as below?
%_folderpath%%_Filename%.%_extension%,XML

You would have to assign a field as target for the file contents. this could be a user-defined field, e.g. XML_DATA.
The Convert>Textfile-Tag expects a structure of 1 line per record/file and can serve several files.