diff --git a/Data/Html/Download.hs b/Data/Html/Download.hs
new file mode 100644
--- /dev/null
+++ b/Data/Html/Download.hs
@@ -0,0 +1,70 @@
+{-|
+    Module      :  Data.Html.Download
+    Copyright   :  (c) Neil Mitchell 2006-2007
+    License     :  BSD-style
+
+    Maintainer  :  http://www.cs.york.ac.uk/~ndm/
+    Stability   :  unstable
+    Portability :  portable
+
+    This module simply downloads a page off the internet. It is very restricted,
+    and it not intended for proper use. The primary purpose is to allow more
+    interesting examples for the "Data.Html.TagSoup" module.
+    
+    The original version was by Alistair Bayley, with additional help from
+    Daniel McAllansmith. It is taken from the Haskell-Cafe mailing list
+    \"Simple HTTP lib for Windows?\", 18 Jan 2007.
+    <http://thread.gmane.org/gmane.comp.lang.haskell.cafe/18443/>
+-}
+
+module Data.Html.Download(openURL) where
+
+import System.IO
+import Network
+import Data.List
+
+-- | This function opens a URL on the internet.
+--   Any @http:\/\/@ prefix is ignored.
+--
+-- > openURL "www.haskell.org/haskellwiki/Haskell"
+--
+-- Known Limitations:
+--
+-- * Only HTTP on port 80
+--
+-- * Outputs the HTTP Headers as well
+--
+-- * Does not work with all servers
+--
+-- It is hoped that a more reliable version of this function will be
+-- placed in a new HTTP library at some point!
+openURL :: String -> IO String
+openURL url | "http://" `isPrefixOf` url = openURL (drop 7 url)
+openURL url = client server 80 (if null path then "/" else path)
+    where (server,path) = break (== '/') url
+
+
+client :: [Char] -> PortNumber -> [Char] -> IO String
+client server port page = withSocketsDo $ do
+    hndl <- connectTo server (PortNumber port)
+    let out x = hPutStrLn hndl (x ++ "\r")
+    hSetBuffering hndl NoBuffering
+
+    out $ "GET " ++ page ++ " HTTP/1.1"
+    out $ "Host: " ++ server ++ ""
+    out $ "Connection: close"
+    out ""
+    out ""
+    readResponse hndl
+
+
+readResponse :: Handle -> IO String
+readResponse hndl = do
+    closed <- hIsClosed hndl
+    eof <- hIsEOF hndl
+    if closed || eof
+        then return []
+        else do
+            c <- hGetChar hndl
+            cs <- readResponse hndl
+            return (c:cs)
diff --git a/Data/Html/TagSoup.hs b/Data/Html/TagSoup.hs
new file mode 100644
--- /dev/null
+++ b/Data/Html/TagSoup.hs
@@ -0,0 +1,184 @@
+{-|
+    Module      :  Data.Html.TagSoup
+    Copyright   :  (c) Neil Mitchell 2006-2007
+    License     :  BSD-style
+
+    Maintainer  :  http://www.cs.york.ac.uk/~ndm/
+    Stability   :  moving towards stable
+    Portability :  portable
+
+    This module is for extracting information out of unstructured HTML code,
+    sometimes known as tag-soup. This is for situations where the author of
+    the HTML is not cooperating with the person trying to extract the information,
+    but is also not trying to hide the information.
+    
+    The standard practice is to parse a String to 'Tag's using 'parseTags', then
+    operate upon it to extract the necessary information.
+-}
+
+
+module Data.Html.TagSoup(
+    -- * Data structures and parsing
+    Tag(..), Attribute, parseTags,
+    module Data.Html.Download,
+    
+    -- * Tag Combinators
+    (~==), (~/=),
+    isTagOpen, isTagClose, isTagText,
+    fromTagText, fromAttrib,
+    isTagOpenName, isTagCloseName,
+    sections, partitions
+    ) where
+
+import Data.Char
+import Data.List
+import Data.Maybe
+import Data.Html.Download
+
+
+-- | An HTML attribute @id=\"name\"@ generates @(\"id\",\"name\")@
+type Attribute = (String,String)
+
+-- | An HTML element, a document is @[Tag]@.
+--   There is no requirement for 'TagOpen' and 'TagClose' to match
+data Tag = TagOpen String [Attribute]  -- ^ An open tag with 'Attribute's in their original order.
+         | TagClose String             -- ^ A closing tag
+         | TagText String              -- ^ A text node, guranteed not to be the empty string
+           deriving (Show, Eq, Ord)
+
+
+-- | Parse an HTML document to a list of 'Tag'.
+-- Automatically expands out escape characters.
+parseTags :: String -> [Tag]
+parseTags [] = []
+
+parseTags ('<':'/':xs) = TagClose tag : parseTags trail
+    where
+        (tag,rest) = span isAlphaNum xs
+        trail = drop 1 $ dropWhile (/= '>') rest
+
+parseTags ('<':xs)
+        | "/>" `isPrefixOf` rest2 = res : TagClose tag : parseTags (drop 2 rest2)
+        | ">" `isPrefixOf` rest2 = res : parseTags (drop 1 rest2)
+        | otherwise = res : parseTags (drop 1 $ dropWhile (/= '>') rest2)
+    where
+        res = TagOpen tag attrs
+        (tag,rest) = span isAlphaNum xs
+        (attrs,rest2) = parseAttributes rest
+
+parseTags (x:xs) = [TagText $ parseString pre | not $ null pre] ++ parseTags post
+    where (pre,post) = break (== '<') (x:xs)
+
+
+parseAttributes :: String -> ([Attribute], String)
+parseAttributes (x:xs) | isSpace x = parseAttributes xs
+                       | not $ isAlpha x = ([], x:xs)
+                       | otherwise = ((parseString lhs, parseString rhs):attrs, over)
+    where
+        (attrs,over) = parseAttributes (dropWhile isSpace other)
+    
+        (lhs,rest) = span isAlphaNum (x:xs)
+        rest2 = dropWhile isSpace rest
+        (rhs,other) = if "=" `isPrefixOf` rest2 then parseValue (dropWhile isSpace $ tail rest2) else ("", rest2)
+        
+
+parseValue :: String -> (String, String)
+parseValue ('\"':xs) = (a, drop 1 b)
+    where (a,b) = break (== '\"') xs
+parseValue x = span isValid x
+    where isValid x = isAlphaNum x || x `elem` "_-"
+
+
+
+escapes = [("gt",">")
+          ,("lt","<")
+          ,("amp","&")
+          ,("quot","\"")
+          ]
+
+
+parseEscape :: String -> Maybe String
+parseEscape ('#':xs) | all isDigit xs = Just [chr $ read xs]
+parseEscape xs = lookup xs escapes
+
+
+
+parseString :: String -> String
+parseString ('&':xs) = case parseEscape a of
+                            Nothing -> '&' : parseString xs
+                            Just x -> x ++ parseString (drop 1 b)
+    where (a,b) = break (== ';') xs
+parseString (x:xs) = x : parseString xs
+parseString [] = []
+
+
+-- | Test if a 'Tag' is a 'TagOpen'
+isTagOpen :: Tag -> Bool
+isTagOpen (TagOpen {})  = True; isTagOpen  _ = False
+
+-- | Test if a 'Tag' is a 'TagClose'
+isTagClose :: Tag -> Bool
+isTagClose (TagClose {}) = True; isTagClose _ = False
+
+-- | Test if a 'Tag' is a 'TagText'
+isTagText :: Tag -> Bool
+isTagText (TagText {})  = True; isTagText  _ = False
+
+-- | Extract the string from within 'TagText', crashes if not a 'TagText'
+fromTagText :: Tag -> String
+fromTagText (TagText x) = x
+
+-- | Extract an attribute, crashes if not a 'TagOpen'.
+--   Returns "" if no attribute present.
+fromAttrib :: String -> Tag -> String
+fromAttrib att (TagOpen _ atts) = fromMaybe "" $ lookup att atts
+
+-- | Returns True if the 'Tag' is 'TagOpen' and matches the given name
+isTagOpenName :: String -> Tag -> Bool
+isTagOpenName name (TagOpen n _) = n == name
+isTagOpenName _ _ = False
+
+-- | Returns True if the 'Tag' is 'TagClose' and matches the given name
+isTagCloseName :: String -> Tag -> Bool
+isTagCloseName name (TagClose n) = n == name
+isTagCloseName _ _ = False
+
+
+-- | Performs an inexact match, the first item should be the thing to match.
+-- If the second item is a blank string, that is considered to match anything.
+-- For example:
+--
+-- > (TagText "test" ~== TagText ""    ) == True
+-- > (TagText "test" ~== TagText "test") == True
+-- > (TagText "test" ~== TagText "soup") == False
+--
+-- For 'TagOpen' missing attributes on the right are allowed.
+(~==) :: Tag -> Tag -> Bool
+(TagText y) ~== (TagText x) = null x || x == y
+(TagClose y) ~== (TagClose x) = null x || x == y
+(TagOpen y ys) ~== (TagOpen x xs) = (null x || x == y) && all f xs
+    where
+        f ("",val) = val `elem` map snd ys
+        f (name,"") = name `elem` map fst ys
+        f nameval = nameval `elem` ys
+_ ~== _ = False
+
+-- | Negation of '~=='
+(~/=) :: Tag -> Tag -> Bool
+(~/=) a b = not (a ~== b)
+
+
+-- | This function takes a list, and returns all initial lists whose
+--   first item matches the function.
+sections :: (a -> Bool) -> [a] -> [[a]]
+sections f [] = []
+sections f (x:xs) = [x:xs | f x] ++ sections f xs
+
+-- | This function is similar to 'sections', but splits the list
+--   so no element appears in any two partitions
+partitions :: (a -> Bool) -> [a] -> [[a]]
+partitions f xs = g $ dropWhile (not . f) xs
+    where
+        g [] = []
+        g (x:xs) = (x:a) : g b
+            where (a,b) = break f xs
diff --git a/Example/Example.hs b/Example/Example.hs
new file mode 100644
--- /dev/null
+++ b/Example/Example.hs
@@ -0,0 +1,79 @@
+
+module Example.Example where
+
+import Data.Html.TagSoup
+import Control.Monad
+import Data.List
+import Data.Char
+
+
+{-
+<div class="printfooter">
+<p>Retrieved from "<a href="http://haskell.org/haskellwiki/Haskell">http://haskell.org/haskellwiki/Haskell</a>"</p>
+
+<p>This page has been accessed 507,753 times. This page was last modified 08:05, 24 January 2007. Recent content is available under <a href="/haskellwiki/HaskellWiki:Copyrights" title="HaskellWiki:Copyrights">a simple permissive license</a>.</p>
+</div>
+-}
+haskellHitCount :: IO ()
+haskellHitCount = do
+        tags <- liftM parseTags $ openURL "http://haskell.org/haskellwiki/Haskell"
+        let count = fromFooter $ head $ sections (~== TagOpen "div" [("class","printfooter")]) tags
+        putStrLn $ "haskell.org has been hit " ++ show count ++ " times"
+    where
+        fromFooter x = read (filter isDigit num) :: Int
+            where
+                num = ss !! (i - 1)
+                Just i = findIndex (== "times.") ss
+                ss = words s
+                TagText s = sections (isTagOpenName "p") x !! 1 !! 1
+
+
+{-
+<a href="http://www.cbc.ca/technology/story/2007/04/10/tech-bloggers.html" id=r-5_1115205181>
+<b>Blogger code of conduct proposed</b>
+-}
+googleTechNews :: IO ()
+googleTechNews = do
+        tags <- liftM parseTags $ openURL "http://news.google.com/?ned=us&topic=t"
+        let links = map extract $ sections match tags
+        putStr $ unlines links
+    where
+        extract xs = fromTagText (xs !! 2)
+        
+        match (TagOpen "a" y)
+            = case lookup "id" y of
+                   Just z -> "r" `isPrefixOf` z && 'i' `notElem` z
+                   _ -> False
+        match _ = False
+
+
+spjPapers :: IO ()
+spjPapers = do
+        tags <- liftM parseTags $ openURL "http://research.microsoft.com/~simonpj/"
+        let links = map f $ sections (isTagOpenName "a") $
+                    takeWhile (~/= TagOpen "a" [("name","haskell")]) $
+                    drop 5 $ dropWhile (~/= TagOpen "a" [("name","current")]) tags
+        putStr $ unlines links
+    where
+        f :: [Tag] -> String
+        f = dequote . unwords . words . fromTagText . head . filter isTagText
+        
+        dequote ('\"':xs) | last xs == '\"' = init xs
+        dequote x = x
+
+
+ndmPapers :: IO ()
+ndmPapers = do
+        tags <- liftM parseTags $ openURL "http://www-users.cs.york.ac.uk/~ndm/downloads/"
+        let papers = map f $ sections (~== TagOpen "li" [("class","paper")]) tags
+        putStr $ unlines papers
+    where
+        f :: [Tag] -> String
+        f xs = fromTagText (xs !! 2)
+    
+
+currentTime :: IO ()
+currentTime = do
+        tags <- liftM parseTags $ openURL "http://www.timeanddate.com/worldclock/city.html?n=136"
+        let time = fromTagText (dropWhile (~/= TagOpen "strong" [("id","ct")]) tags !! 1)
+        putStrLn time
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/tagsoup.cabal b/tagsoup.cabal
new file mode 100644
--- /dev/null
+++ b/tagsoup.cabal
@@ -0,0 +1,13 @@
+Name:           tagsoup
+Version:        0.1
+License:        BSD3
+Author:         Neil Mitchell
+Homepage:       http://www-users.cs.york.ac.uk/~ndm/projects/libraries.php
+Build-Depends:  base, network
+Synopsis:       Parsing and extracting information from (possibly malformed) HTML documents
+Exposed-modules:
+        Data.Html.TagSoup
+        Data.Html.Download
+Extra-Source-Files:
+		tagsoup.htm
+		Example/Example.hs
diff --git a/tagsoup.htm b/tagsoup.htm
new file mode 100644
--- /dev/null
+++ b/tagsoup.htm
@@ -0,0 +1,277 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        <title>Drinking TagSoup by Example</title>
+        <style type="text/css">
+pre {
+    border: 2px solid gray;
+    padding: 1px;
+    padding-left: 5px;
+    margin-left: 10px;
+    background-color: #eee;
+}
+
+pre.define {
+    background-color: #ffb;
+    border-color: #cc0;
+}
+
+body {
+    font-family: sans-serif;
+}
+
+h1, h2, h3 {
+    font-family: serif;
+}
+
+h1 {
+    color: rgb(23,54,93);
+    border-bottom: 1px solid rgb(79,129,189);
+    padding-bottom: 2px;
+    font-variant: small-caps;
+    text-align: center;
+}
+
+a {
+    color: rgb(54,95,145);
+}
+
+h2 {
+    color: rgb(54,95,145);
+}
+
+h3 {
+    color: rgb(79,129,189);
+}
+
+p.rule {
+    background-color: #ffb;
+	padding: 3px;
+	margin-left: 50px;
+	margin-right: 50px;
+}
+        </style>
+    </head>
+    <body>
+
+<h1>Drinking TagSoup by Example</h1>
+
+<p style="text-align:right;margin-bottom:25px;">
+    by <a href="http://www.cs.york.ac.uk/~ndm/">Neil Mitchell</a>
+</p>
+
+<p>
+	TagSoup is a library for extracting information out of unstructured HTML code, sometimes known as tag-soup. The HTML does not have to be well formed, or render properly within any particular framework. This library is for situations where the author of the HTML is not cooperating with the person trying to extract the information,
+    but is also not trying to hide the information.
+</p>
+<p>
+	This document gives two particular examples, and two more may be found in the <a href="http://www.cs.york.ac.uk/fp/darcs/tagsoup/Example/Example.hs">Example</a> file from the darcs repository. The examples we give are:
+</p>
+<ol>
+    <li>Obtaining the Hit Count from Haskell.org</li>
+    <li>Obtaining a list of Simon Peyton-Jones' latest papers</li>
+    <li>A brief overview of some other examples</li>
+</ol>
+<p>
+	The intial version of this library was written in Javascript and has been used for various commercial projects involving screen scraping. In the examples general hints on screen scraping are included, learnt from bitter experience. It should be noted that if you depend on data which someone else may change at any given time, you may be in for a shock!
+</p>
+<p>
+	This library was written without knowledge of the Java version of <a href="http://home.ccil.org/~cowan/XML/tagsoup/">TagSoup</a>. They have made a very different design decision, to ensure default attributes are present and to properly nest parsed tags. We do not do this - tags are merely a list devoid of nesting information.
+</p>
+
+<h3>Acknowledgements</h3>
+
+<p>
+    Thanks to Mike Dodds for persuading me to write this up as a library.
+</p>
+
+<h2>Potential Bugs</h2>
+
+<p>
+    There are two things that may go wrong with these examples:
+</p>
+<ul>
+    <li>
+        <i>The Websites being scraped may change.</i> There is nothing I can do about this, but if you suspect this is the case let me know, and I'll update the examples and tutorials. I have already done so once or twice, its only a few minutes work.
+    </li>
+    <li>
+        <i>The <tt>openURL</tt> method may not work.</i> This happens quite regularly, and depending on your server, proxies and direction of the wind, they may not work. The solution is to use <tt>wget</tt> to download the page locally, then use <tt>readFile</tt> instead. Hopefully a decent Haskell HTTP library will emerge, and that can be used instead.
+    </li>
+</ul>
+
+
+<h2>Haskell Hit Count</h2>
+
+<p>
+    Our goal is to develop a program that displays the Haskell.org hit count. This example covers all the basics in designing a basic web-scraping application.
+</p>
+
+<h3>Finding the Page</h3>
+
+<p>
+	We first need to find where the information is displayed, and in what format. Taking a look at the <a href="http://www.haskell.org/haskellwiki/Haskell">front web page</a>, when not logged in, you may notice that there is no hit count. However, looking at the source shows us:
+</p>
+<pre>
+&lt;div class="printfooter"&gt;
+&lt;p&gt;Retrieved from "&lt;a href="http://www.haskell.org/haskellwiki/Haskell"&gt;
+http://www.haskell.org/haskellwiki/Haskell&lt;/a&gt;"&lt;/p&gt;
+
+&lt;p&gt;This page has been accessed 615,165 times.
+This page was last modified 15:44, 15 March 2007.
+Recent content is available under &lt;a href="/haskellwiki/HaskellWiki:Copyrights"
+title="HaskellWiki:Copyrights"&gt;a simple permissive license&lt;/a&gt;.&lt;/p&gt;
+</pre>
+<p>
+	So we see that the hit count is available, but not shown. This leads us to rule 1:
+</p>
+<p class="rule">
+	<b>Rule 1:</b><br/>
+	Scrape from what the page returns, not what a browser renders, or what view-source gives.
+</p>
+<p>
+	Some web servers will serve different content depending on the user agent, some browsers will have scripting modify their displayed HTML, some pages will display differently depending on your cookies. Before you can start to figure out how to start scraping, first decide what the input to your program will be. The usual step is to write a simple program:
+</p>
+<pre>
+import Data.Html.TagSoup
+
+main = do src <- openURL "http://haskell.org/haskellwiki/Haskell"
+	      writeFile "temp.htm" src
+</pre>
+<p>
+	The function <tt>openURL</tt> comes from Data.Html.Download, part of the TagSoup library. Now open <tt>temp.htm</tt>, check this fragment of HTML is in it, and see what has been returned. Only now do we consider how to extract the information.
+</p>
+
+<h3>Finding the Information</h3>
+
+<p>
+	Now we examine both the fragment that contains our snippet of information, and the wider page. What does the fragment has that nothing else has? What algorithm would we use to obtain that particular element? How can we still return the element as the content changes? What if the design changes? But wait, before going any further:
+</p>
+<p class="rule">
+	<b>Rule 2:</b><br/>
+	Do not be robust to design changes, do not even consider the possibility when writing the code.
+</p>
+<p>
+	If the user changes their website, they will do so in unpredictable ways. They may move the page, they may put the information somewhere else, they may remove the information entirely. If you want something robust talk to the site owner, or buy the data from someone. If you try and think about design changes, you will complicate your design, and it still won't work. It is better to write an extraction method quickly, and happily rewrite it when things change.
+</p>
+<p>
+	So now, lets consider the fragment from above. It is useful to find a tag which is unique just above your snippet - something with a nice "id" property, or a "class" - something which is unlikely to occur multiple times. In the above example, "printfooter" as the class seems perfect. We decide that to find the snippet, we will start at a "div" tag, with a "class" attribute with the value "printfooter".
+</p>
+<pre>
+haskellHitCount = do
+	tags <- liftM parseTags $ openURL "http://haskell.org/haskellwiki/Haskell"
+	let count = fromFooter $ head $ sections (~== TagOpen "div" [("class","printfooter")]) tags
+	putStrLn $ "haskell.org has been hit " ++ show count ++ " times"
+</pre>
+<p>
+	Now we start writing the code! The first thing to do is open the required URL, then we parse the code into a list of <tt>Tag</tt>s. We then apply the <tt>sections</tt> function, which returns all the lists whose first element matches the query. We use the <tt>(~==)</tt> operator to construct the query - in this case asking for the "div" we mentioned earlier. This <tt>(~==)</tt> operator is very different from standard equality, it allows additional attributes to be present but does not match them. If we just wanted any open tag with the given class we could have written <tt>(~== TagOpen "" [("class","printfooter")])</tt> and this would have matched. Any empty strings in the second element of the match are considered as wildcards.
+</p>
+<p>
+	Once we have a list of all matching prefixes, we take the <tt>head</tt> - assuming that only one will match. Then we apply <tt>fromFooter</tt> which needs to perform the traversal from the "printfooter" attribute onwards to the actual hit count data.
+</p>
+
+<h3>Extracting the Information</h3>
+
+<p>
+	Now we have a stream starting at the right place, we generally mangle the code using standard list operators:
+</p>
+<pre>
+fromFooter x = read (filter isDigit num) :: Int
+	where
+		num = ss !! (i - 1)
+		Just i = findIndex (== "times.") ss
+		ss = words s
+		TagText s = sections (isTagOpenName "p") x !! 1 !! 1
+</pre>
+<p>
+	This code finds <tt>s</tt>, the text inside the appropriate paragraph by knowing that its the second (<tt>!! 1</tt>) paragraph, and within that paragraph, its the second tag - the actual text. We then split up the text using <tt>words</tt>, find the message that comes after hit count, and read all the digits we can find - filtering out the comma. This code may seem slightly messy, and indeed it is - often that is the nature of extracting information from a tag soup.
+</p>
+<p class="rule">
+	<b>Rule 3:</b><br/>
+	TagSoup is for extracting information where structure has been lost, use more structured information if it is available.
+</p>
+
+
+<h2>Simon's Papers</h2>
+
+<p>
+	Our next very important task is to extract a list of all Simon Peyton Jones' recent research papers off his <a href="http://research.microsoft.com/~simonpj/">home page</a>. The largest change to the previous example is that now we desire a list of papers, rather than just a single result.
+</p>
+<p>
+	As before we first start by writing a simple program that downloads the appropriate page, and look for common patterns. This time we want to look for all patterns which occur every time a paper is mentioned, but no where else. The other difference from last time is that previous we grabbed an automatically generated piece of information - this time the information is entered in a more freeform way by a human.
+</p>
+<p>
+	First we spot that the page helpfully has named anchors, there is a current work anchor, and after that is one for Haskell. We can extract all the information between them with a simple <tt>take</tt>/<tt>drop</tt> pair:
+</p>
+<pre>
+takeWhile (~/= TagOpen "a" [("name","haskell")]) $
+drop 5 $ dropWhile (~/= TagOpen "a" [("name","current")]) tags
+</pre>
+<p>
+	This code drops until you get to the "current" section, then takes until you get to the "haskell" section, ensuring we only look at the important bit of the page. Next we want to find all hyperlinks within this section:
+</p>
+<pre>
+map f $ sections (isTagOpenName "a") $ ...
+</pre>
+<p>
+	The function to select all tags with name "a" could have been written as <tt>(~== TagOpen "a" [])</tt>, but we choose to use <tt>isTagOpenName</tt> instead. Afterwards we map each item with an <tt>f</tt> function. This function needs to take the tags starting just after the link, and find the text inside the link.
+</p>
+<pre>
+f = dequote . unwords . words . fromTagText . head . filter isTagText
+</pre>
+<p>
+	Here the complexity of interfacing to human written markup comes through. Some of the links are in italic, some are not - the <tt>filter</tt> drops all those that are not, until we find a pure text node. The <tt>unwords . words</tt> deletes all multiple spaces, replaces tabs and newlines with spaces and trims the front and back - a neat trick when dealing with text which has spacing at the source code but not when displayed. The final thing to take account of is that some papers are given with quotes around the name, some are not - dequote will remove the quotes if they exist.
+</p>
+<p>
+	For completeness, we now present the entire example:
+</p>
+<pre>
+spjPapers :: IO ()
+spjPapers = do
+        tags <- liftM parseTags $ openURL "http://research.microsoft.com/~simonpj/"
+        let links = map f $ sections (isTagOpenName "a") $
+                    takeWhile (~/= TagOpen "a" [("name","haskell")]) $
+                    drop 5 $ dropWhile (~/= TagOpen "a" [("name","current")]) tags
+        putStr $ unlines links
+    where
+        f :: [Tag] -> String
+        f = dequote . unwords . words . fromTagText . head . filter isTagText
+
+        dequote ('\"':xs) | last xs == '\"' = init xs
+        dequote x = x
+</pre>
+
+
+<h2>Other Examples</h2>
+
+<p>
+	Two more examples are given in the Example file, obtaining the (short) list of papers from my site, and getting the current time. Both use very much the same style as presented here - writing screen scrapers follow a standard pattern. We present the code for enjoyment only.
+</p>
+
+<h3>My Papers</h3>
+
+<pre>
+ndmPapers :: IO ()
+ndmPapers = do
+        tags <- liftM parseTags $ openURL "http://www-users.cs.york.ac.uk/~ndm/downloads/"
+        let papers = map f $ sections (~== TagOpen "li" [("class","paper")]) tags
+        putStr $ unlines papers
+    where
+        f :: [Tag] -> String
+        f xs = fromTagText (xs !! 2)
+</pre>
+
+<h3>UK Time</h3>
+
+<pre>
+currentTime :: IO ()
+currentTime = do
+        tags <- liftM parseTags $ openURL "http://www.timeanddate.com/worldclock/city.html?n=136"
+        let time = fromTagText (dropWhile (~/= TagOpen "strong" [("id","ct")]) tags !! 1)
+        putStrLn time
+</pre>
+
+
+    </body>
+</html>
