
Hello I presents a small case studie, when I was using HaXml with DtdToHaskell. I write small DTD:
<!ELEMENT top (#PCDATA|child)* > <!ELEMENT child (#PCDATA) >
I run DtdToHaskell small.DTD > Extsubext.hs and test it with small XML
<top><child></child></top>
Result it is presented below:
$ ghci Extsubset.hs GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. [1 of 1] Compiling Extsubset ( Extsubset.hs, interpreted ) Ok, modules loaded: Extsubset. *Extsubset> fReadXml "sample.xml" :: IO Top Loading package array-0.1.0.0 ... linking ... done. Loading package bytestring-0.9.0.1 ... linking ... done. Loading package pretty-1.0.0.0 ... linking ... done. Loading package old-locale-1.0.0.0 ... linking ... done. Loading package old-time-1.0.0.0 ... linking ... done. Loading package filepath-1.1.0.0 ... linking ... done. Loading package directory-1.0.0.0 ... linking ... done. Loading package random-1.0.0.0 ... linking ... done. Loading package process-1.0.0.0 ... linking ... done. Loading package haskell98 ... linking ... done. Loading package polyparse-1.1 ... linking ... done. Loading package containers-0.1.0.1 ... linking ... done. Loading package HaXml-1.19.4 ... linking ... done. *** Exception: stack overflow *Extsubset>
HaXml is able handle XML mixed elements? -- Don't hug that, Hugs ME! Samuel Silva