Updating publish profile parse logic to be more robust.