ImportResult(..),
run_dbmigrate )
import TSN.Parse (
+ ParseError,
parse_message,
parse_xmlfid,
parse_xml_time_stamp )
-- | Attempt to parse a 'SportInfo' from an 'XmlTree'. If we cannot,
-- we fail with an error message.
--
-parse_xml :: String -> XmlTree -> Either String SportInfo
+parse_xml :: String -> XmlTree -> Either ParseError SportInfo
parse_xml dtdname xmltree = do
xmlfid <- parse_xmlfid xmltree
timestamp <- parse_xml_time_stamp xmltree
message <- parse_message xmltree
- return $ SportInfo dtdname (fromInteger xmlfid) timestamp (xshow [message])
+ return $ SportInfo dtdname xmlfid timestamp (xshow [message])
--
let a2 = xml_file_id t
let ex2 = 2011
let a3 = show $ time_stamp t
- let ex3 = "2009-09-28 00:50:00 UTC"
+ let ex3 = "2009-09-27 19:50:00 UTC"
let a4 = take 9 (xml t)
let ex4 = "<message>"
let actual = (a1,a2,a3,a4)