Re: [Haskell-cafe] No copy XML parser (rough idea only)

2010-05-20 Thread Neil Mitchell
Hi Joachim, I have been playing around with this idea myself in TagSoup (http://community.haskell.org/~ndm/tagsoup). The largest conceptual problem I came across was that TagSoup decodes entities (i.e. gt; becomes ). However, I think that's a minor issue, and entity resolution can be turned off

[Haskell-cafe] No copy XML parser (rough idea only)

2010-05-14 Thread Joachim Breitner
Hi, an idea recently crossed my mind that describes a (possibly?) useful way of accessing XML data from Haskell that is very memory efficient – at least as long as you only read the XML; for XML processing and generation, other existing libraries are probably well suited. Given a (possibly very

Re: [Haskell-cafe] No copy XML parser (rough idea only)

2010-05-14 Thread John Millikin
The primary problem I see with this is that XML content is fundamentally text, not bytes. Using your types, two XML documents with identical content but different encodings will have different Haskell values (and thus be incorrect regarding Eq, Ord, etc). Additionally, since the original

Re: [Haskell-cafe] No copy XML parser (rough idea only)

2010-05-14 Thread Felipe Lessa
On Fri, May 14, 2010 at 08:57:42AM -0700, John Millikin wrote: Additionally, since the original bytestring is shared in your types, potentially very large buffers could be locked in memory due to references held by only a small portion of the document. Chopping a document up into events or

Re: [Haskell-cafe] No copy XML parser (rough idea only)

2010-05-14 Thread Joachim Breitner
Hi, Am Freitag, den 14.05.2010, 15:31 -0300 schrieb Felipe Lessa: On Fri, May 14, 2010 at 08:57:42AM -0700, John Millikin wrote: Additionally, since the original bytestring is shared in your types, potentially very large buffers could be locked in memory due to references held by only a