forked from aristidb/aws
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce Aws.Xml for some common XML-related functions
- Loading branch information
Showing
7 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Aws.Xml | ||
where | ||
|
||
import Text.XML.Enumerator.Cursor | ||
import qualified Data.Text as T | ||
import qualified Text.XML.Enumerator.Parse as XML | ||
import qualified Text.XML.Enumerator.Resolved as XML | ||
|
||
elCont :: T.Text -> Cursor -> [String] | ||
elCont name = laxElement name &/ content &| T.unpack | ||
|
||
force :: e -> [a] -> Either e a | ||
force e [] = Left e | ||
force _ (x:_) = Right x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters