Comment to XML conversion: replace string comparison with command ID comparison