Class XMLParser

Direct Known Subclasses:
HtmlParser, JsonParser

public class XMLParser extends SingleParser
This class parses the tokens that are delivered by the XMLScanner and sends them to the specified database builder. This class is a more tolerant alternative to Java's internal SAX parser, which is used by the SAXWrapper class.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • XMLParser

      public XMLParser(IO source, MainOptions opts) throws IOException
      Constructor.
      Parameters:
      source - document source
      opts - database options
      Throws:
      IOException - I/O exception
    • XMLParser

      public XMLParser(IO source, MainOptions opts, boolean frag) throws IOException
      Constructor.
      Parameters:
      source - document source
      opts - database options
      frag - allow parsing of document fragment
      Throws:
      IOException - I/O exception
  • Method Details

    • parse

      public final void parse() throws IOException
      Description copied from class: SingleParser
      Parses the current input.
      Specified by:
      parse in class SingleParser
      Throws:
      IOException - I/O exception
    • close

      public void close() throws IOException
      Description copied from class: Parser
      Closes the parser.
      Overrides:
      close in class Parser
      Throws:
      IOException - I/O exception
    • detailedInfo

      public final String detailedInfo()
      Description copied from class: Job
      Returns detailed progress information. Can be overwritten to give more specific feedback.
      Overrides:
      detailedInfo in class Job
      Returns:
      header information
    • progressInfo

      public final double progressInfo()
      Description copied from class: Job
      Returns a progress value (0 - 1). Can be overwritten to give more specific feedback.
      Overrides:
      progressInfo in class Job
      Returns:
      header information