Fixes #6730 : close() xml reader on fromFile() and fromString()

Fixes #6730
I need to find a test case that doesn't need to access internal deps or check their state...