Class XMLParser

java.lang.Object
org.episteme.social.linguistics.loaders.tigerxml.core.XMLParser

public class XMLParser extends Object
Provides static XML parsing functionality. * $Id: XMLParser.java,v 1.2 2007-10-21 17:47:08 virtualcall Exp $
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • XMLParser

      public XMLParser(String xmlFileName)
    • XMLParser

      public XMLParser(String xmlFileName, int verbosity)
  • Method Details

    • getDOMRootElement

      public Element getDOMRootElement()
      Parses the a given XML corpus file.
      Returns:
      The root element of the DOM built from this instances XML file.
    • getXMLFileName

      public String getXMLFileName()
    • setXMLFileName

      public boolean setXMLFileName(String xmlFileName)
      Sets the XML file to be parsed.
      Parameters:
      xmlFileName -
      Returns:
      True if the file is readable, false if not.
    • getVerbosity

      public int getVerbosity()
      Gets the currently set level of verbosity of this instance. The higher the value the more information is written to stderr.
      Returns:
      The level of verbosity.
    • setVerbosity

      public void setVerbosity(int verbosity)
      Sets the currently set level of verbosity of this instance. The higher the value the more information is written to stderr.
      Parameters:
      verbosity - The level of verbosity.