amazonka-core-1.4.4: 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 Source #

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

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

class FromXML a where Source #

Minimal complete definition

parseXML

Methods

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

Instances

FromXML Bool Source # 

Methods

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

FromXML Char Source # 

Methods

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

FromXML Double Source # 

Methods

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

FromXML Int Source # 

Methods

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

FromXML Integer Source # 

Methods

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

FromXML ByteString Source # 

Methods

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

FromXML Text Source # 

Methods

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

FromXML Natural Source # 

Methods

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

FromXML Nat Source # 

Methods

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

FromXML Region Source # 

Methods

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

FromXML RequestId Source # 

Methods

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

FromXML ErrorMessage Source # 
FromXML ErrorCode Source # 

Methods

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

FromXML Abbrev Source # 

Methods

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

FromXML Base64 Source # 

Methods

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

FromXML AWSTime Source # 

Methods

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

FromXML BasicTime Source # 

Methods

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

FromXML ISO8601 Source # 

Methods

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

FromXML RFC822 Source # 

Methods

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

FromXML [Node] Source # 

Methods

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

FromXML a => FromXML (Maybe a) Source # 

Methods

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

FromXML a => FromXML (Sensitive a) Source # 

Methods

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

class ToElement a where Source #

Minimal complete definition

toElement

Methods

toElement :: a -> Element Source #

Instances

ToElement Element Source # 

Methods

toElement :: Element -> 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.

Constructors

XNull 
XOne Node 
XMany [Node] 

Instances

Show XML Source # 

Methods

showsPrec :: Int -> XML -> ShowS #

show :: XML -> String #

showList :: [XML] -> ShowS #

Monoid XML Source # 

Methods

mempty :: XML #

mappend :: XML -> XML -> XML #

mconcat :: [XML] -> XML #

ToXML XML Source # 

Methods

toXML :: XML -> XML Source #

listXMLNodes :: XML -> [Node] Source #

class ToXML a where Source #

Minimal complete definition

toXML

Methods

toXML :: a -> XML Source #

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

parseXMLList :: FromXML a => Text -> [Node] -> Either String [a] Source #

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

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

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

withElement :: Text -> ([Node] -> Either String a) -> [Node] -> Either String a 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.

childNodesOf :: Text -> Node -> Maybe [Node] Source #

rootElementName :: LazyByteString -> Maybe Text Source #

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

missingElement :: Text -> [Node] -> Maybe a -> Either String a Source #