packages feed

HXQ-0.19.0: tests/TestXMark.hs

{--------------------------------------------------------------
-
- Test the XQuery processor using the XMark benchmark
- Dowmload and compile XMark from
-    http://monetdb.cwi.nl/xml/index.html
- Then use parameter -f 10 to create 1.1GB test file xdata.xml
- Programmer: Leonidas Fegaras (fegaras@cse.uta.edu)
- Date: 03/29/2009
-
---------------------------------------------------------------}

{-# LANGUAGE TemplateHaskell #-}


module Main where

import Text.XML.HXQ.XQuery

main = do a <- $(xq "   for $m in doc('data/xdata.xml')//europe//mail      \
                    \   where $m/date='08/06/1999'                         \
                    \   return <mail>from: {$m/child::from/text()}, to: {$m/child::to/text()}</mail> ")
          putXSeq a