Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Utility functions related to XML parsing.
Synopsis
- saml2Name :: Text -> Name
- saml2pName :: Text -> Name
- xencName :: Text -> Name
- dsName :: Text -> Name
- mdName :: Text -> Name
- toMaybeText :: [Text] -> Maybe Text
- showUTCTime :: UTCTime -> Text
- parseUTCTime :: MonadFail m => Text -> m UTCTime
- class FromXML a where
- oneOrFail :: MonadFail m => String -> [a] -> m a
Namespaces
saml2pName :: Text -> Name Source #
saml2pName
name
constructs a Name
for name
in the
urn:oasis:names:tc:SAML:2.0:protocol namespace.
xencName :: Text -> Name Source #
xencName
name
constructs a Name
for name
in the
http://www.w3.org/2001/04/xmlenc# namespace.
dsName :: Text -> Name Source #
dsName
name
constructs a Name
for name
in the
http://www.w3.org/2000/09/xmldsig# namespace.
Utility functions
toMaybeText :: [Text] -> Maybe Text Source #
toMaybeText
xs
returns Nothing
if xs
is the empty list, or
the result of concatenating xs
wrapped in Just
otherwise.
showUTCTime :: UTCTime -> Text Source #
Display a UTCTime
as an ISO8601 timestamp including up to
6 digits for the microseconds.
Since: 0.4.0.0
parseUTCTime :: MonadFail m => Text -> m UTCTime Source #
parseUTCTime
text
parses text
into a UTCTime
value.
XML parsing
class FromXML a where Source #
A class of types which can be parsed from XML.