hxt-pickle-utils-0.1.0.3: Utility functions for using HXT picklers.

Safe HaskellNone
LanguageHaskell2010

Text.Xml.Pickle

Description

Some utility functions for using hxt picklers.

Synopsis

Documentation

toXML :: XmlPickler p => p -> String Source

Convert a value to an XML string.

fromXML :: XmlPickler a => String -> a Source

Parse a string containing xml to a value. On parse failure, will call error.

maybeFromXML :: XmlPickler a => String -> Maybe a Source

Parse a string containing xml to a value, or Nothing if the parse fails.

eitherFromXML :: XmlPickler a => String -> Either String a Source

Parse a string containing xml to a value, or an error message on failure.