Added a more generic version of parseContentent