Which XML parser for Haskell? -


I am trying to write some applications, which analyzes data, stores in very large XML files ( 10 to 800MB)) Each set of data is stored as a single tag, which contains the solid data specified as the entropy. I am currently a succession to Haxal, and while working with it I am not satisfied with the use of memory. When parsing the 15 MB XML file, it consumes more than 1 GB of memory, although I did not try to store the data in lists and it was processed immediately I used the following code:

< Pre> importOneFile file proc ioproc = do xml & lt; - Enter the readFile file (sxs, res) = saxParse file $ stripUnicodeBOM xml Res Res string -> PutStrLn $ "Error:" ++ str; Nothing - & gt; ForM_sxs (ioproc proc. (ExtractAttrs "row"))

Where 'proc' - process, which records the conversion of data into the data, and 'IOOPR' - process, something IO takes action - output on the screen, storage in database etc.

How can I reduce memory consumption during XML parsing? Should switch to another XML parser support?

Update: Which Parser supports for various input encoding - UTF-8, UTF-16, UTF-32, etc.?

If you are ready to accept that your input is valid, then Galois people see or Consider it.

Take the stars as input, so you can feed them indirectly, i.e.

  • ASCII
  • UTF8
  • Li> ISO88592
  • ISO88595
  • ISO88596
  • ISO88597
  • ISO88598
  • ISO885913
  • ISO885914
  • ISO885915
  • ISO 885 916
  • < CP1250
  • CP1252
  • CP123
  • CP1254
  • CP1255 < / Li>
  • cp256
  • cp2557
  • CP1258
  • MacOSORN
  • DI SX0201
  • JISX0208
  • ISO2022JP
  • JISX0212
  • < / Ul>

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -