Added command-line conversion utility
Getty Ritter
10 years ago
1 | module Main where | |
2 | ||
3 | import Data.NML.XMLLight | |
4 | import qualified Data.Text.IO as T | |
5 | import Text.XML.Light.Output (showContent) | |
6 | ||
7 | main :: IO () | |
8 | main = do | |
9 | contents <- T.getContents | |
10 | let xml = decode contents | |
11 | case xml of | |
12 | Just x -> putStrLn (showContent x) | |
13 | Nothing -> error "Unable to parse NML document" |