--- * NewsLocationXml
-
--- | The XML type for locations as they show up in the news. The
--- associated database type comes from "TSN.Location".
---
-data NewsLocationXml =
- NewsLocationXml {
- xml_city :: Maybe String,
- xml_state :: Maybe String,
- xml_country :: String }
- deriving (Eq, Show)
-
-
-instance ToDb NewsLocationXml where
- -- | The database analogue of a NewsLocationXml is a Location.
- type Db NewsLocationXml = Location
-
-
-instance FromXml NewsLocationXml where
- -- | To convert from the XML representation to the database one, we
- -- don't have to do anything. Just copy the fields.
- --
- from_xml NewsLocationXml{..} =
- Location xml_city xml_state xml_country
-
-
--- | Allow us to import the XML representation directly into the
--- database, without having to perform the conversion manually first.
---
-instance XmlImport NewsLocationXml
-
-