let pcdata_of_string (s: string): string =
let s_amp = Str.global_replace (Str.regexp "&") "&" s in
let s_lt = Str.global_replace (Str.regexp "<") "<" s_amp in
let s_gt = Str.global_replace (Str.regexp ">") ">" s_lt in
let s_apos = Str.global_replace (Str.regexp "\'") "'" s_gt in
let s_quot = Str.global_replace (Str.regexp "\"") """ s_apos in
s_quot