+
+
+-- | The data structure that holds the XML representation of a
+-- GameInfo message.
+--
+data Message =
+ Message {
+ dtd :: String,
+ xml_file_id :: Int,
+ time_stamp :: UTCTime,
+ xml :: String }
+ deriving (Eq, Show)
+
+
+from_xml :: String -> XmlTree -> Either String Message
+from_xml dtdname xmltree = do
+ xmlfid <- parse_xmlfid xmltree
+ timestamp <- parse_xml_time_stamp xmltree
+ message <- parse_message xmltree
+ return $ Message dtdname (fromInteger xmlfid) timestamp (xshow [message])
+