Ok, questions and comments:
1. Is this to be used in a Microsoft Sync system? It might help with figuring out specifics about the playlist format. For example, I've read that Sync needs full path names. Your example has relative path names, which probably won't work based on what I read.
2. Are you using MC's Handhelds feature to copy music and playlists? Or are you manually exporting one or more playlists?
3. I don't think WPL format is in any way necessary for Sync. M3U is supposed to work. Then you won't have the problem with the XML tags after you do a find and replace.
4. If you REALLY want to use WPL for some reason, you can still do a find and replace. You just have to do 3 of them. First one replaces / with \. Next one replaces \> with /> . Final one replaces <\ with </ . That should fully transform the file correctly. Here's a command line that does all of that in one shot for the named file:
perl -pi -e 's/\//\\/g;s/<\\/<\//g;s/\\>/\/>/g' "Put the Filename here without quotes"
You could automate this further by having the command line operate on all of the playlists in a directory for example.
I would suggest you do some testing to find out what playlist format works with your system, whether it can use relative paths, etc. Then you can work on a strategy for doing these exports in as easy a way as possible.
Brian.