XML character dereferencer

Just in case you ever need one: xmlCharDeref :: String -> String xmlCharDeref [] = [] xmlCharDeref (’&':’#':’x':r) = let (digits, remainder) = span (/= ‘;’) r c = chr (read ("0x" ++ digits)) in c : xmlCharDeref (tail remainder) xmlCharDeref (’&':’#':r) = let (digits, remainder) = span (/= ‘;’) r c = chr (read …

Continue reading ‘XML character dereferencer’ »

Share