Fix #13974: XML .attr("type")
(cherry picked from commit adf30903182f6ab99e3490ceac5a8c37bc59e325)