[Haskell-cafe] Haskell XML Parsers
sc06r2s at leeds.ac.uk
Fri Apr 30 06:35:59 EDT 2010
I have been looking at using XML for a little program I have been
writing. The file I am currently trying to load is about 9MB, and I have
now tried to use
HaXml and HST. Without any of my own code, just a simple call to the
basic parsers, they both use huge amount of memory.
HST is the worst and about 7GB and climbing. HaXml uses 1.3Gb.
The code I am using is
xml <- readFile file_name_here;k<-runX (parseXmlDocument True) xml;print k
and for HaXml
let (Document _ _ e _) = xmlParse "t" x
let t = myFilter $ CElem e
print $ length t
I have seen on previous posts to the cafe that other people have run
into this problem with HST. Is this a general problem with XML in
Haskell (I know that XML parsing is a slow and bulky process but this
seems excessive)? Is there a known solution? Does anyone have any advice?
More information about the Haskell-Cafe