-- a root element \<message\> that contains an entire news item.
--
module TSN.XML.News (
+ dtd,
pickle_message,
-- * Tests
news_tests,
import Data.Typeable ( Typeable )
import Database.Groundhog (
countAll,
- executeRaw,
+ deleteAll,
insert_,
migrate,
runMigration,
unsafe_unpickle )
+-- | The DTD to which this module corresponds. Used to invoke dbimport.
+--
+dtd :: String
+dtd = "newsxml.dtd"
+
+
--
-- DB/XML Data types
--
migrate d
migrate e
_ <- dbimport news
- -- No idea how 'delete' works, so do this instead.
- executeRaw False "DELETE FROM news;" []
+ deleteAll a
count_a <- countAll a
count_b <- countAll b
count_c <- countAll c