6 import Data.Maybe (listToMaybe, mapMaybe)
7 import Text.Read (readMaybe)
8 import Text.XML.HXT.Core (
17 -- | A tiny parser written in HXT to extract the "XML_File_ID" element
19 parse_xmlfid :: String -> Maybe Integer
21 listToMaybe . mapMaybe readMaybe . parse
23 parse :: String -> [String]
27 /> hasName "XML_File_ID"
32 -- | The opening "tag" for the XML prologue.
33 xml_prologue :: String
34 xml_prologue = "<?xml "