[Haskell-cafe] Re: HaXML - creating a simple document

Terrence Brannon metaperl.haskell at gmail.com
Sat Dec 30 19:30:51 EST 2006


Actually, the examples directory in the distro for the development release
has a nice program to create an element and print it to stdout called
SimpleTestBool.hs:

module Main where

import List (isPrefixOf)
import Text.XML.HaXml.XmlContent
import Text.XML.HaXml.Types
import Text.PrettyPrint.HughesPJ (render)
import Text.XML.HaXml.Pretty     (document)

-- Test stuff
--value1 :: ([(Bool,Int)],(String,Maybe Char))
value1 = True

--main = do (putStrLn . render . document . toXml) value2

main = fWriteXml "/dev/tty" value1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20061230/39c1f575/attachment-0001.htm


More information about the Haskell-Cafe mailing list