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 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 # 
FromXML Char Source # 
FromXML Double Source # 
FromXML Int Source # 
FromXML Integer Source # 
FromXML ByteString Source # 
FromXML Text Source # 
FromXML Natural Source # 
FromXML Nat Source # 
FromXML Region Source # 
FromXML RequestId Source # 
FromXML ErrorMessage Source # 
FromXML ErrorCode Source # 
FromXML Abbrev Source # 
FromXML Base64 Source # 
FromXML AWSTime Source # 
FromXML BasicTime Source # 
FromXML ISO8601 Source # 
FromXML RFC822 Source # 
FromXML [Node] Source # 
FromXML a => FromXML (Maybe a) Source # 

Methods

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

FromXML a => FromXML (Sensitive a) Source # 

class ToElement a where Source #

Minimal complete definition

toElement

Methods

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.

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 #

class ToXML a where Source #

Minimal complete definition

toXML

Methods

toXML :: a -> XML Source #

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.