{-------------------------------------------------------------- - - A main program to test XML shredding and publishing - - Programmer: Leonidas Fegaras (fegaras@cse.uta.edu) - Date: 07/24/2008 - ---------------------------------------------------------------} {-# OPTIONS_GHC -fth #-} module Main where import Text.XML.HXQ.XQuery main = do db <- connect "myDB" -- Before compilation, you do: shred db "data/cs.xml" "c" res <- $(xqdb (" for $s in publish('myDB','c')//gradstudent " ++ " where $s//lastname='Galanis' " ++ " return $s//gpa ")) db putXSeq res -- disconnect db