2.4 Compatibility

$xml parameter is now a XMLElement object instead of a string