JSON to XML patches from Scott McKellar: