15 lines
262 B
Haskell
15 lines
262 B
Haskell
|
|
import Data.List
|
||
|
|
import Text.XML.Light
|
||
|
|
|
||
|
|
xmlDOM :: String -> String
|
||
|
|
xmlDOM txt = showTopElement $ Element
|
||
|
|
(unqual "root")
|
||
|
|
[]
|
||
|
|
[ Elem $ Element
|
||
|
|
(unqual "element")
|
||
|
|
[]
|
||
|
|
[Text $ CData CDataText txt Nothing]
|
||
|
|
Nothing
|
||
|
|
]
|
||
|
|
Nothing
|