Added XML patch functionality