X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=blobdiff_plain;f=src%2FTwitter%2FXml.hs;h=1b1ea48e9015ce1732e6898d4dcbfdf7b98b3176;hp=b34c6fbae94c4ca8629eec48ad849becb98c23e8;hb=27c6a7e62a428ceb1d2a60d456b075feee196da9;hpb=ff79ba3157559b1f809607c60d3c72fccaf539f4 diff --git a/src/Twitter/Xml.hs b/src/Twitter/Xml.hs index b34c6fb..1b1ea48 100644 --- a/src/Twitter/Xml.hs +++ b/src/Twitter/Xml.hs @@ -2,7 +2,6 @@ module Twitter.Xml where -import Data.Maybe import Test.HUnit import Text.Regex (mkRegex, subRegex) import Text.XML.HaXml @@ -16,6 +15,13 @@ get_char_data (CRef ref) = Just (verbatim ref) -- Entities. get_char_data _ = Nothing +-- |A 'CFilter' returning all top-level elements. +-- The name is due to the fact that if we retrieve more than +-- one status, they will be wrapped in a tag, and +-- thus not be top-level. +single_status :: CFilter +single_status = (tag "status") + -- |A 'CFilter' returning all tags within . all_statuses :: CFilter all_statuses = (tag "statuses" /> tag "status")