Like you already pointed out to me face to face, I would change the name of $rawxml to $rawdata or something, considering it may contain either xml or json now.