Mass Tag using XML files

I have a library of music that is in .WAV format without any tagging. The Metadata for each song is stored in a separate XML file. How Do I get MP3Tag to read the individual XML file for each .WAV file?

Ie. My directory contains 9770 .wav files. There are 9770 .xml files that have the metadata for each .wav file. They are all in the same folder.

Is there a way to get MP3Tag to use the XML file in a mass tagging operation? I'd hate to have to do this one song at a time.

Any ideas?
Thanks!

There is no way that you can directly import data from an XML file.
For Import, the file has to have one line per record. So you probably would have to convert the files (anyway).

The action for importing data from a file allows a format string for the filename of the text file. So you can use any variable or text constant to create that filename. If it happens to be the filename of the audio file, then use
%_filename%.xml
(although xml is not a suitable format).

Give us an example how the xml-file looks like.

Is there any usable relation between the song file and the xml file?
How are the song files named?
How are the xml files named?
In the song file's tag, is there any tag field having an unique value (path, number, ...), which can identify the related xml file?

By loading each fitting xml file into an user defined tagfield within the related song file, via Action "Import text file", then with further actions it is possible to evaluate the loaded xml text and fill the related tagfields.

DD.20170712.1155.CEST

The XML file is the same name as the WAV file.

I.e 001022301.wav and 001022301.xml

The system will export the metadata only in two file types: XML and a proprietary DAT file format.

XML Data found in XML file:
<XMLDAT>
    <Version>1</Version>
    <Cart>10223</Cart>
    <Cut>1</Cut>
    <Type>2</Type>
    <Category>AC/HOT AC</Category>
    <Title>SMOOTH</Title>
    <Start_Time>03/16/2009 00:00:00</Start_Time>
    <End_Time>01/02/2100 11:59:59</End_Time>
    <Archive_Time>01/02/2100 11:59:59</Archive_Time>
    <Modified_Time>03/16/2009 12:11:06</Modified_Time>
    <Overall_Tempo>1</Overall_Tempo>
    <File_Name>G:\001022301.WAV</File_Name>
    <Length>240541</Length>
    <Runtime>232490</Runtime>
    <Intro_3>9594</Intro_3>
    <Outro>0</Outro>
    <Intro_Start>0</Intro_Start>
    <Outro_Start>0</Outro_Start>
    <Cross_Fade>8051</Cross_Fade>
    <Comments></Comments>
    <Erase_Time>01/02/2100 11:59:59</Erase_Time>
    <Replay>0</Replay>
    <User_Define></User_Define>
    <Fade>0</Fade>
    <Fade_Up_Start>-1</Fade_Up_Start>
    <Fade_Up_Length>-1</Fade_Up_Length>
    <Fade_Down_Start>232490</Fade_Down_Start>
    <Fade_Down_Length>2000</Fade_Down_Length>
    <Intro_1>0</Intro_1>
    <Intro_2>1</Intro_2>
    <HeadsTails>0</HeadsTails>
    <Artist>SANTANA/ROB THOMAS</Artist>
    <AudioNotes></AudioNotes>
    <ProductionType>0</ProductionType>
    <Label_ID></Label_ID>
    <Label></Label>
    <Album></Album>
    <FilmName></FilmName>
    <MetaData_ID></MetaData_ID>
    <Composer></Composer>
    <ArtistID>12</ArtistID>
    <CategoryID>62</CategoryID>
    <LicensorID>-1</LicensorID>
    <RatingCode></RatingCode>
    <ContentLevel>-1</ContentLevel>
    <Mix></Mix>
    <ISRC>USAV70000050</ISRC>
    <HookStart>0</HookStart>
    <HookEnd>0</HookEnd>
    <HookFadeUp>0</HookFadeUp>
    <HookFadeDown>0</HookFadeDown>
    <Product_ID>0</Product_ID>
    <Artist_ID>0</Artist_ID>
    <Mediabase_ID>0</Mediabase_ID>
    <Apple_ID>0</Apple_ID>
    <URL></URL>
</XMLDAT>

You can try converting the XML files to CSV files.
There are various online sites that do this.

Or, for the command line, see here:
https://superuser.com/questions/1038868/con...y-in-powershell

But for use with Mp3tag, you will probably have to remove the CSV header line some how.

Once you have imported the data from the XML file via Action "Import text file" into a tagfield, e. g. named as XMLDAT, then you can evaluate the XML data and extract the values your are interested in.

Action "Import text file"
Field: XMLDAT
Filename: %_filename%'.xml'

Action "Format value"
Field: TITLE
Format string: $regexp(%XMLDAT%,'^.(.+?).$','$1')

DD.20170712.2215.CEST

Thanks for the suggestion. I am looking into it now.

An action of the type "Guess value" should also be possible.
If you have the same structure and sequence of pieces of data in all files, you could try something like
Guess value for XMLDAT
Guessing pattern: %dummy%%title%%dummy%%artist%%dummy%
(and so on)