with this code (error is not touched, as specified in the main example for lazy parsing)
withHexpat fIn fOut = do
inputText <- L.readFile fIn
let (xml, _) = parse defaultParseOptions inputText :: (UNode String,Maybe XMLParseError)
outputFile xml
where
outputFile xml = do
h <- IO.openBinaryFile fOut IO.WriteMode
L.hPutStr h $ format xml
IO.hClose h
it very soon takes over 10GBs of memory, when I have to kill it.
I'm testing
hexpat
on a larger XML file (140MB), with a relatively simple structure:with this code (error is not touched, as specified in the main example for lazy parsing)
it very soon takes over 10GBs of memory, when I have to kill it.