Created
March 15, 2010 13:06
-
-
Save dino-/332808 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env runhaskell | |
import Text.HTML.TagSoup | |
main :: IO () | |
main = do | |
tags <- fmap parseTags $ readFile "foo.xml"; | |
let names = sections (~== "<name>") $ tags | |
mapM_ (\t -> putStrLn $ "saw: " ++ t ) $ map fromTagText | |
$ map (flip (!!) 1) names |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment