(* Converts non xml friendly characters on the clipboard to equivalent character entities. -- So < ' " & > becomes < ' " & > --CBT *) do shell script " pbpaste | perl -0777pwe 's/([\"\\47&<>])/sprintf(\"&#%d;\", ord($1))/eg' | pbcopy "
open txt2xml in the applescript editor