dtdParse  :: String -> String -> Maybe DocTypeDecl

{-
-- | To parse just a DTD, @dtdParse' file content@ takes a filename
--   (for generating error reports) and the string content of that
--   file.  If no DTD was found, you get @Right Nothing@.
--   If a DTD was found but contains errors, you get a @Left message@.
dtdParse' :: String -> String -> Either String (Maybe DocTypeDecl)

xmlParse' name inp = xmlParse name inp `catch` (Left . show)
dtdParse' name inp = dtdParse name inp `catch` (Left . show)
-}

xmlParse  name  = fst3 . runParser (toEOF document) emptySTs . xmlLex name
dtdParse  :: String -> String -> Maybe DocTypeDecl
xmlParse  name  = fst3 . runParser (toEOF document) emptySTs . xmlLex name
xmlParse  name  = fst3 . runParser (toEOF document) emptySTs . xmlLex name