diff options
Diffstat (limited to 'src/GF/Data')
| -rw-r--r-- | src/GF/Data/XML.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Data/XML.hs b/src/GF/Data/XML.hs index 94d8e354a..fbb28d94d 100644 --- a/src/GF/Data/XML.hs +++ b/src/GF/Data/XML.hs @@ -8,7 +8,7 @@ -- Utilities for creating XML documents. ----------------------------------------------------------------------------- -module GF.Data.XML (XML(..), Attr, comments, showsXMLDoc, showsXML) where +module GF.Data.XML (XML(..), Attr, comments, showsXMLDoc, showsXML, bottomUpXML) where import GF.Data.Utilities @@ -48,3 +48,7 @@ escape = concatMap escChar escChar '&' = "&" escChar '"' = """ escChar c = [c] + +bottomUpXML :: (XML -> XML) -> XML -> XML +bottomUpXML f (Tag n attrs cs) = f (Tag n attrs (map (bottomUpXML f) cs)) +bottomUpXML f x = f x |
