saml2-web-sso-0.20: Library and example web app for the SAML Web-based SSO profile.
Safe HaskellNone
LanguageGHC2021

Text.XML.Util

Synopsis

Documentation

die :: forall a b c m. (HasCallStack, Typeable a, Show b, MonadError String m) => Proxy a -> b -> m c Source #

die' :: forall a b c m. (HasCallStack, Typeable a, Show b, MonadError String m) => Maybe String -> Proxy a -> b -> m c Source #

ourDocToXMLWithoutRoot :: HasCallStack => XmlTree -> ByteString Source #

Direct usage of xshowBlob breaks non-Latin-1 encodings (e.g. UTF-8, Unicode)! This helper function works around these issues.

ourDocToXMLWithRoot :: XmlTree -> ByteString Source #

Direct usage of xshowBlob breaks non-Latin-1 encodings (e.g. UTF-8, Unicode)! This helper function works around these issues.

xmlToDoc' :: MonadError String m => ByteString -> m XmlTree Source #

This is subtly different from HS.xmlToDoc' and should probably be moved to hsaml2.

stripWhitespace :: Document -> Document Source #

Remove all whitespace in the text nodes of the xml document.

mergeContentSiblings :: Document -> Document Source #

if two content nodes are next to each other, concatenate them into one. NB: if you call stripWhitespace it should be called *after* mergeContentSiblings, or some two words will be merged into one.