Patches courtesy by Ivan Vaklinov (with one little modification), direct
XML access