1 -- | Minimal XML functionality needed to parse each document's
9 import Data.Maybe (listToMaybe, mapMaybe)
10 import Text.Read (readMaybe)
11 import Text.XML.HXT.Core (
20 -- | A tiny parser written in HXT to extract the "XML_File_ID" element
22 parse_xmlfid :: String -> Maybe Integer
24 listToMaybe . mapMaybe readMaybe . parse
26 parse :: String -> [String]
30 /> hasName "XML_File_ID"
35 -- | The opening "tag" for the XML prologue.
36 xml_prologue :: String
37 xml_prologue = "<?xml "