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

Safe HaskellNone

Text.Xml.Pickle

Description

Some utility functions for using hxt picklers.

Synopsis

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.