xml in fptools?
ashley at semantic.org
Tue May 23 18:00:36 EDT 2006
Malcolm Wallace wrote:
> HaXml has a module Text.XML.HaXml.SAX with the signature
> saxParse :: String -- ^ The filename
> -> String -- ^ The content of the file
> -> ([SaxElement],Maybe String)
> -- ^ A tuple of the parsed elements and @Nothing@, if no
> -- error occured, or @Just@ @String@ if an error occured.
That's not very good for streaming, though, unless you happen to have
lazy IO available for your text stream source. It seems to me the whole
point of SAX is that you get some XML information even when you don't
have all the input yet.
I usually model monadic stream sources as "m Char", or "m (Maybe Char)"
if one cares about "End Of Source". Equally, sinks can be represented as
"Char -> m ()".
Ashley Yakeley, Seattle WA
More information about the Libraries