Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- (.@) :: FromXML a => [Node] -> Text -> Either String a
- (.@?) :: FromXML a => [Node] -> Text -> Either String (Maybe a)
- (@=) :: ToXML a => Name -> a -> XML
- (@@=) :: ToText a => Name -> a -> XML
- decodeXML :: FromXML a => ByteStringLazy -> Either String a
- encodeXML :: ToElement a => a -> ByteStringLazy
- class FromXML a where
- class ToElement a where
- maybeElement :: ToElement a => a -> Maybe Element
- data XML
- listXMLNodes :: XML -> [Node]
- listXMLAttributes :: XML -> [(Name, Text)]
- class ToXML a where
- parseXMLMap :: (Eq k, Hashable k, FromText k, FromXML v) => Text -> Text -> Text -> [Node] -> Either String (HashMap k v)
- parseXMLList1 :: FromXML a => Text -> [Node] -> Either String (NonEmpty a)
- parseXMLList :: FromXML a => Text -> [Node] -> Either String [a]
- parseXMLText :: FromText a => String -> [Node] -> Either String a
- toXMLList :: (IsList a, ToXML (Item a)) => Name -> a -> XML
- toXMLText :: ToText a => a -> XML
- mkElement :: ToXML a => Name -> a -> Element
- withContent :: String -> [Node] -> Either String (Maybe Text)
- findElement :: Text -> [Node] -> Either String [Node]
- firstElement :: Text -> [Node] -> Either String [Node]
- childNodesOf :: Text -> Node -> Maybe [Node]
- childrenOf :: Element -> [Node]
- localName :: Node -> Maybe Text
- rootElementName :: ByteStringLazy -> Maybe Text
- missingElement :: Text -> [Node] -> Maybe a -> Either String a
Documentation
encodeXML :: ToElement a => a -> ByteStringLazy Source #
class FromXML a where Source #
Instances
FromXML Base64 Source # | |
FromXML AWSTime Source # | |
FromXML BasicTime Source # | |
FromXML ISO8601 Source # | |
FromXML RFC822 Source # | |
FromXML Abbrev Source # | |
FromXML AccessKey Source # | |
FromXML AuthEnv Source # | |
FromXML ErrorCode Source # | |
FromXML ErrorMessage Source # | |
Defined in Amazonka.Types | |
FromXML Region Source # | |
FromXML RequestId Source # | |
FromXML SecretKey Source # | |
FromXML SessionToken Source # | |
Defined in Amazonka.Types | |
FromXML ByteString Source # | |
Defined in Amazonka.Data.XML | |
FromXML Text Source # | |
FromXML Integer Source # | |
FromXML Natural Source # | |
FromXML Bool Source # | |
FromXML Char Source # | |
FromXML Double Source # | |
FromXML Int Source # | |
FromXML a => FromXML (Sensitive a) Source # | |
FromXML a => FromXML (Maybe a) Source # | |
FromXML [Node] Source # | |
maybeElement :: ToElement a => a -> Maybe Element Source #
Convert to an Element
, only if the resulting element contains > 0
nodes.
Provides a way to make the operators for ToXML instance declaration be consistent WRT to single nodes or lists of nodes.
listXMLNodes :: XML -> [Node] Source #
Instances
ToXML Base64 Source # | |
ToXML AWSTime Source # | |
ToXML BasicTime Source # | |
ToXML ISO8601 Source # | |
ToXML RFC822 Source # | |
ToXML XML Source # | |
ToXML AccessKey Source # | |
ToXML Region Source # | |
ToXML SecretKey Source # | |
ToXML SessionToken Source # | |
Defined in Amazonka.Types toXML :: SessionToken -> XML Source # | |
ToXML ByteString Source # | |
Defined in Amazonka.Data.XML toXML :: ByteString -> XML Source # | |
ToXML Text Source # | |
ToXML Integer Source # | |
ToXML Natural Source # | |
ToXML Bool Source # | |
ToXML Double Source # | |
ToXML Int Source # | |
ToXML a => ToXML (Sensitive a) Source # | |
ToXML a => ToXML (Maybe a) Source # | |
parseXMLMap :: (Eq k, Hashable k, FromText k, FromXML v) => Text -> Text -> Text -> [Node] -> Either String (HashMap k v) 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.
childrenOf :: Element -> [Node] Source #
rootElementName :: ByteStringLazy -> Maybe Text Source #
An inefficient mechanism for retreiving the root element name of an XML document.