[Haskell-cafe] Processing XML with HXT

Albert Y. C. Lai trebla at vex.net
Tue Apr 22 22:31:25 EDT 2008


rodrigo.bonifacio wrote:
> I´m just starting with HXT. My question is, how can I expose a "use case" from the main function below (the XmlPickler for UseCase has been already defined):
> 
> main :: IO ()
> main = do
>       runX ( xunpickleDocument xpUseCase [ (a_validate,v_0) ],  "uc.xml" )
>       return ()
> 
> For example, if I just want to show the use case contents, how can I call "show" for a retrived use case.

y <- runX (xunpickleDocument xpUseCase [ (a_validate,v_0) ] "uc.xml")
print y

Remark: y :: [UseCase]



More information about the Haskell-Cafe mailing list