org.jscience.ml.tigerxml.core
Class XmlParser

java.lang.Object
  extended by org.jscience.ml.tigerxml.core.XmlParser

public class XmlParser
extends java.lang.Object

Provides static XML parsing functionality.


Constructor Summary
XmlParser(java.lang.String xmlFileName)
           
XmlParser(java.lang.String xmlFileName, int verbosity)
           
 
Method Summary
 org.w3c.dom.Element getDOMRootElement()
          Parses the a given XML corpus file.
 int getVerbosity()
          Gets the currently set level of verbosity of this instance.
 java.lang.String getXmlFileName()
           
 void setVerbosity(int verbosity)
          Sets the currently set level of verbosity of this instance.
 boolean setXmlFileName(java.lang.String xmlFileName)
          Sets the XML file to be parsed.
 void useDOM()
           
 void useSAX()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlParser

public XmlParser(java.lang.String xmlFileName)

XmlParser

public XmlParser(java.lang.String xmlFileName,
                 int verbosity)
Method Detail

getDOMRootElement

public org.w3c.dom.Element getDOMRootElement()
Parses the a given XML corpus file.

Returns:
The root element of the DOM built from this instances XML file.

getXmlFileName

public java.lang.String getXmlFileName()

setXmlFileName

public boolean setXmlFileName(java.lang.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.

useDOM

public void useDOM()

useSAX

public void useSAX()