[Haskell-cafe] Fwd: Stack Overflow with HaXml

Samuel Silva silva.samuel at gmail.com
Fri Jun 27 04:55:38 EDT 2008


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


More information about the Haskell-Cafe mailing list