first_user = user_from_content (users !! 0)
+-- |Takes an XML String as an argument, and returns the
+-- status that was parsed from it. Should only be used
+-- on XML string where a <status> is a top-level element.
+parse_status :: String -> [Status]
+parse_status xml_data =
+ catMaybes maybe_status
+ where
+ (Document _ _ root _) = xmlParse xml_file_name xml_data
+ root_elem = CElem root
+ status_element = (single_status root_elem)
+ maybe_status = map status_from_content status_element
+
+
-- |Takes an XML String as an argument, and returns the list of
-- statuses that can be parsed from it.
parse_statuses :: String -> [Status]