Skip to content

Instantly share code, notes, and snippets.

@dino-
Created March 15, 2010 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dino-/332808 to your computer and use it in GitHub Desktop.
Save dino-/332808 to your computer and use it in GitHub Desktop.
#! /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