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

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Data.XML

Description

 

Synopsis

Documentation

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

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

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

class FromXML a where #

Minimal complete definition

parseXML

Methods

parseXML :: [Node] -> Either String a #

Instances

FromXML Bool # 

Methods

parseXML :: [Node] -> Either String Bool #

FromXML Char # 

Methods

parseXML :: [Node] -> Either String Char #

FromXML Double # 
FromXML Int # 

Methods

parseXML :: [Node] -> Either String Int #

FromXML Integer # 
FromXML ByteString # 
FromXML Text # 

Methods

parseXML :: [Node] -> Either String Text #

FromXML Natural # 
FromXML Nat # 

Methods

parseXML :: [Node] -> Either String Nat #

FromXML Region # 
FromXML RequestId # 
FromXML ErrorMessage # 
FromXML ErrorCode # 
FromXML Abbrev # 
FromXML Base64 # 
FromXML AWSTime # 
FromXML BasicTime # 
FromXML ISO8601 # 
FromXML RFC822 # 
FromXML [Node] # 

Methods

parseXML :: [Node] -> Either String [Node] #

FromXML a => FromXML (Maybe a) # 

Methods

parseXML :: [Node] -> Either String (Maybe a) #

FromXML a => FromXML (Sensitive a) # 

Methods

parseXML :: [Node] -> Either String (Sensitive a) #

class ToElement a where #

Minimal complete definition

toElement

Methods

toElement :: a -> Element #

Instances

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

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

data XML #

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

Constructors

XNull 
XOne Node 
XMany [Node] 

Instances

Show XML # 

Methods

showsPrec :: Int -> XML -> ShowS #

show :: XML -> String #

showList :: [XML] -> ShowS #

Monoid XML # 

Methods

mempty :: XML #

mappend :: XML -> XML -> XML #

mconcat :: [XML] -> XML #

ToXML XML # 

Methods

toXML :: XML -> XML #

class ToXML a where #

Minimal complete definition

toXML

Methods

toXML :: a -> XML #

Instances

ToXML Bool # 

Methods

toXML :: Bool -> XML #

ToXML Double # 

Methods

toXML :: Double -> XML #

ToXML Int # 

Methods

toXML :: Int -> XML #

ToXML Integer # 

Methods

toXML :: Integer -> XML #

ToXML ByteString # 

Methods

toXML :: ByteString -> XML #

ToXML Text # 

Methods

toXML :: Text -> XML #

ToXML Natural # 

Methods

toXML :: Natural -> XML #

ToXML XML # 

Methods

toXML :: XML -> XML #

ToXML Nat # 

Methods

toXML :: Nat -> XML #

ToXML Region # 

Methods

toXML :: Region -> XML #

ToXML Base64 # 

Methods

toXML :: Base64 -> XML #

ToXML AWSTime # 

Methods

toXML :: AWSTime -> XML #

ToXML BasicTime # 

Methods

toXML :: BasicTime -> XML #

ToXML ISO8601 # 

Methods

toXML :: ISO8601 -> XML #

ToXML RFC822 # 

Methods

toXML :: RFC822 -> XML #

ToXML a => ToXML (Maybe a) # 

Methods

toXML :: Maybe a -> XML #

ToXML a => ToXML (Sensitive a) # 

Methods

toXML :: Sensitive a -> XML #

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

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

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

mkElement :: ToXML a => Name -> a -> Element #

withElement :: Text -> ([Node] -> Either String a) -> [Node] -> Either String a #

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

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

Fails if absent.

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

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

Fails if absent.

rootElementName :: LazyByteString -> Maybe Text #

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