[Haskell-cafe] Programming style and XML processing in Haskell
Duncan Coutts
duncan.coutts at worcester.oxford.ac.uk
Thu May 13 19:21:04 EDT 2004
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.
I suggest this would be a very useful feature of a standard xml library.
Duncan
More information about the Haskell-Cafe
mailing list