Safe Haskell | None |
---|
Some utility functions for using hxt picklers.
- toXML :: XmlPickler p => p -> String
- fromXML :: XmlPickler a => String -> a
- maybeFromXML :: XmlPickler a => String -> Maybe a
- eitherFromXML :: XmlPickler a => String -> Either String a
Documentation
toXML :: XmlPickler p => p -> StringSource
Convert a value to an XML string.
fromXML :: XmlPickler a => String -> aSource
Parse a string containing xml to a value. On parse failure, will
call error
.
maybeFromXML :: XmlPickler a => String -> Maybe aSource
Parse a string containing xml to a value, or Nothing
if the
parse fails.
eitherFromXML :: XmlPickler a => String -> Either String aSource
Parse a string containing xml to a value, or an error message on failure.