Various playlists formats can be typically converted between one another and .xspf (XML shareable playlist) and .m3u8 are not exception in this.
You can either do that using a media player that allows for import/export of playlists, or with some kind of dedicated playlist editor software.