Parameterize failure on fromXML

Is fundeps the right thing to do here?
Refactor