[Haskell-cafe] Programming style and XML processing in Haskell

garroyo at dsic.upv.es garroyo at dsic.upv.es
Sat May 15 04:27:53 EDT 2004


Mensaje citado por Duncan Coutts <duncan.coutts at worcester.oxford.ac.uk>:

> Something which wasn't mentioned but is quite useful is type-specialised
> xml parsers. Some tools manipulate xml generically, giving you back some
> DOM tree which is great if you are writing a general purpose xml parser.
> However most uses know exactly what DTD/Schema/Type they are dealing
> with and would like to get their own data type back from the parser (as
> well as having the parser validate it). This allows you to use the
> parser/pretty printer in a similar way to ordinary read/show. Other
> people have pointed out that this should make xslt-style transformations
> really easy (and type safe). (Automatically deriving readXML/showXML
> would be nice!)
> 
> Some Haskell xml libs/tookits have tools for converting DTD<->Haskell
> types.

We made some experiments embedding G-codes (ISO 6983) in Haskell. We defined a 
DTD for the G-codes format and use HaXml as the authors indicate. It works! 
both experiments they said. HaXml is useful for converting XML <-> Haskell!
> 
> I suggest this would be a very useful feature of a standard xml library.
> 
> Duncan
> 
We suggest more comprehensive experiments before convert HaXml a standard 
Haskell library.

Regards.

Gustavo. 

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


More information about the Haskell-Cafe mailing list