24 Jan 2013 16:40
hxt pickling question
<briand <at> aracnet.com>
2013-01-24 15:40:19 GMT
2013-01-24 15:40:19 GMT
Hi,
Trying to understand how to write a document using a pickler but I can't make sense of the types.
From the example:
runX ( xunpickleDocument xpSeason
[ withValidate no
, withTrace 1
, withRemoveWS yes
, withPreserveComment no
] "simple2.xml"
>>>
processSeason
>>>
xpickleDocument xpSeason
[ withIndent yes
] "new-simple2.xml"
)
So all I want to do is pickle a value directly instead of reading the value from a document. I expected to do
something like:
runX (someHXTPicklingFunction myValue
>>>
xpickleDocument ...)
but I can't seem to figure out what someHXTPicklingFunction should be, it's certainly nothing obvious
like pickleDoc, because that generates the wrong value.
(Continue reading)
I was stuck looking in Text.XML.HXT.Arrow.Pickle for the answer and got lost
trying to decipher IOStateArrow s a XmlTree and runX.
It's odd that there does not seem to be a way to use the example so that a tree can be written directly to a file.
xpickleDocument :: PU a -> SysConfigList -> String -> IOStateArrow s a XmlTreeSource
store an arbitray value in a persistent XML document
Except there doesn't seem to be a way to pass that value into xpickleDocument without reading a document
first using xunpickleDocument.
Thanks again.
Brian
> Erik
>
> [0]
RSS Feed