parseComplete :: Parser -> IO ()
parseComplete parser = do
  preexistingBytes <- readIORef $ parserInputBuffer parser
  if not $ BS.null preexistingBytes
    then parserErrorHandler parser $ "Trailing garbage at end of XML."
    else return ()
parseComplete :: Parser -> IO ()
parseComplete parser = do
  preexistingBytes <- readIORef $ parserInputBuffer parser
  if not $ BS.null preexistingBytes
    then parserErrorHandler parser $ "Trailing garbage at end of XML."
    else return ()
parseComplete parser = do
  preexistingBytes <- readIORef $ parserInputBuffer parser
  if not $ BS.null preexistingBytes
    then parserErrorHandler parser $ "Trailing garbage at end of XML."
    else return ()