Package opennlp.tools.formats.muc

# Class SgmlParser

java.lang.Object
opennlp.tools.formats.muc.SgmlParser

public class SgmlParser extends Object
A SAX style SGML parser.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `SgmlParser.ContentHandler`
  Defines methods to handle content produced by a `SgmlParser`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SgmlParser()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `parse(Reader in, SgmlParser.ContentHandler handler)`
  Parses an SGML document available via the input in `Reader`.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SgmlParser

    public SgmlParser()

- ## Method Details

  - ### parse

    public void parse(Reader in, SgmlParser.ContentHandler handler) throws IOException
    Parses an SGML document available via the input in `Reader`. The specified `SgmlParser.ContentHandler` is responsible of how to interpret the document specific details.
    Parameters:
      `in` - A `Reader` that provides the data of the SGML document.
      `handler` - The `SgmlParser.ContentHandler` to interpret the document with.
    Throws:
      `IOException` - Thrown if IO errors occurred.
      `InvalidFormatException` - Thrown if parameters were invalid.