changing tag plugin utility to use an xml parser rather than multiple regexes