Generalize XML manifest processing code and improve XSPF parsing (closes #15794)