Modulehxt-9.3.1.22Haskell2010
Text.XML.HXT.Arrow.Pickle
Pickler functions for converting between user defined data types
and XmlTree data. Usefull for persistent storage and retreival
of arbitray data as XML documents
This module is an adaptation of the pickler combinators
developed by Andrew Kennedy
( https://www.microsoft.com/en-us/research/wp-content/uploads/2004/01/picklercombinators.pdf )
The difference to Kennedys approach is that the target is not
a list of Chars but a list of XmlTrees. The basic picklers will
convert data into XML text nodes. New are the picklers for
creating elements and attributes.
One extension was neccessary: The unpickling may fail.
Therefore the unpickler has a Maybe result type.
Failure is used to unpickle optional elements
(Maybe data) and lists of arbitray length
There is an example program demonstrating the use
of the picklers for a none trivial data structure.
(see "examples/arrows/pickle" directory)