ImportResult(..),
run_dbmigrate )
import TSN.Parse (
+ ParseError,
parse_message,
parse_xmlfid,
parse_xml_time_stamp )
"NCAA_Conference_Schedule_XML.dtd",
"nflfirstdownxml.dtd",
"NFLFumbleLeaderXML.dtd",
+ "NFLGrassTurfDomeOutsideXML.dtd",
"NFLGiveTakeXML.dtd",
"NFLInside20XML.dtd",
+ "NFLInterceptionLeadersXML.dtd",
"NFLKickoffsXML.dtd",
"NFLMondayNightXML.dtd",
+ "NFLPassingLeadersXML.dtd",
"NFLPassLeadXML.dtd",
"NFLQBStartsXML.dtd",
+ "NFLReceivingLeadersXML.dtd",
"NFLSackLeadersXML.dtd",
"nflstandxml.dtd",
"NFLTeamRankingsXML.dtd",
-- | 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])
--