Maybe add `if defined? xml`, and the same below where it's used