amazonka-core-2.0: Core data types and functionality for Amazonka libraries.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.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 #

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

class FromXML a where Source #

Methods

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

Instances

Instances details
FromXML Base64 Source # 
Instance details

Defined in Amazonka.Data.Base64

FromXML AWSTime Source # 
Instance details

Defined in Amazonka.Data.Time

FromXML BasicTime Source # 
Instance details

Defined in Amazonka.Data.Time

FromXML ISO8601 Source # 
Instance details

Defined in Amazonka.Data.Time

FromXML RFC822 Source # 
Instance details

Defined in Amazonka.Data.Time

FromXML Abbrev Source # 
Instance details

Defined in Amazonka.Types

FromXML AccessKey Source # 
Instance details

Defined in Amazonka.Types

FromXML AuthEnv Source # 
Instance details

Defined in Amazonka.Types

FromXML ErrorCode Source # 
Instance details

Defined in Amazonka.Types

FromXML ErrorMessage Source # 
Instance details

Defined in Amazonka.Types

FromXML Region Source # 
Instance details

Defined in Amazonka.Types

FromXML RequestId Source # 
Instance details

Defined in Amazonka.Types

FromXML SecretKey Source # 
Instance details

Defined in Amazonka.Types

FromXML SessionToken Source # 
Instance details

Defined in Amazonka.Types

FromXML ByteString Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML Text Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML Integer Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML Natural Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML Bool Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML Char Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML Double Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML Int Source # 
Instance details

Defined in Amazonka.Data.XML

FromXML a => FromXML (Sensitive a) Source # 
Instance details

Defined in Amazonka.Data.Sensitive

FromXML a => FromXML (Maybe a) Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

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

FromXML [Node] Source # 
Instance details

Defined in Amazonka.Data.XML

class ToElement a where Source #

Methods

toElement :: a -> Element Source #

Instances

Instances details
ToElement Element Source # 
Instance details

Defined in Amazonka.Data.XML

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 
XAttr Name Text 
XOne Node 
XMany [(Name, Text)] [Node] 

Instances

Instances details
ToXML XML Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: XML -> XML Source #

Monoid XML Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

mempty :: XML #

mappend :: XML -> XML -> XML #

mconcat :: [XML] -> XML #

Semigroup XML Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

(<>) :: XML -> XML -> XML #

sconcat :: NonEmpty XML -> XML #

stimes :: Integral b => b -> XML -> XML #

Show XML Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

showsPrec :: Int -> XML -> ShowS #

show :: XML -> String #

showList :: [XML] -> ShowS #

class ToXML a where Source #

Methods

toXML :: a -> XML Source #

Instances

Instances details
ToXML Base64 Source # 
Instance details

Defined in Amazonka.Data.Base64

Methods

toXML :: Base64 -> XML Source #

ToXML AWSTime Source # 
Instance details

Defined in Amazonka.Data.Time

Methods

toXML :: AWSTime -> XML Source #

ToXML BasicTime Source # 
Instance details

Defined in Amazonka.Data.Time

Methods

toXML :: BasicTime -> XML Source #

ToXML ISO8601 Source # 
Instance details

Defined in Amazonka.Data.Time

Methods

toXML :: ISO8601 -> XML Source #

ToXML RFC822 Source # 
Instance details

Defined in Amazonka.Data.Time

Methods

toXML :: RFC822 -> XML Source #

ToXML XML Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: XML -> XML Source #

ToXML AccessKey Source # 
Instance details

Defined in Amazonka.Types

Methods

toXML :: AccessKey -> XML Source #

ToXML Region Source # 
Instance details

Defined in Amazonka.Types

Methods

toXML :: Region -> XML Source #

ToXML SecretKey Source # 
Instance details

Defined in Amazonka.Types

Methods

toXML :: SecretKey -> XML Source #

ToXML SessionToken Source # 
Instance details

Defined in Amazonka.Types

ToXML ByteString Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: ByteString -> XML Source #

ToXML Text Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: Text -> XML Source #

ToXML Integer Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: Integer -> XML Source #

ToXML Natural Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: Natural -> XML Source #

ToXML Bool Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: Bool -> XML Source #

ToXML Double Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: Double -> XML Source #

ToXML Int Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: Int -> XML Source #

ToXML a => ToXML (Sensitive a) Source # 
Instance details

Defined in Amazonka.Data.Sensitive

Methods

toXML :: Sensitive a -> XML Source #

ToXML a => ToXML (Maybe a) Source # 
Instance details

Defined in Amazonka.Data.XML

Methods

toXML :: Maybe a -> XML Source #

parseXMLMap :: (Eq k, Hashable k, FromText k, FromXML v) => Text -> Text -> Text -> [Node] -> Either String (HashMap k v) 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 :: ByteStringLazy -> Maybe Text Source #

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