amazonka-core-1.4.0: Core data types and functionality for Amazonka libraries.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <>
Portabilitynon-portable (GHC extensions)
Safe HaskellNone






(.@) :: FromXML a => [Node] -> Text -> Either String a infixl 7 Source

(.@?) :: FromXML a => [Node] -> Text -> Either String (Maybe a) infixl 7 Source

(@=) :: ToXML a => Name -> a -> XML infixr 7 Source

class ToElement a where Source


toElement :: a -> Element Source

maybeElement :: ToElement a => a -> Maybe Element Source

Convert to an Element, only if the resulting element contains > 0 nodes.

data XML Source

Provides a way to make the operators for ToXML instance declaration be consistent WRT to single nodes or lists of nodes.


XOne Node 
XMany [Node] 

toXMLNodes :: ToXML a => a -> [Node] Source

toXMLList :: (IsList a, ToXML (Item a)) => Name -> a -> XML Source

toXMLText :: ToText a => a -> XML Source

findElement :: Text -> [Node] -> Either String [Node] Source

Find a specific named NodeElement, at the current depth in the node tree.

Fails if absent.

firstElement :: Text -> [Node] -> Either String [Node] Source

Find the first specific named NodeElement, at any depth in the node tree.

Fails if absent.

rootElementName :: LazyByteString -> Maybe Text Source

An inefficient mechanism for retreiving the root element name of an XML document.