Allowing the option of supplied xml rather than loading it