salsa.corpora.xmlparser
Class CorpusParser

java.lang.Object
  extended by salsa.corpora.xmlparser.CorpusParser

public class CorpusParser
extends java.lang.Object


Constructor Summary
CorpusParser()
          Zero-argumented default constructor.
 
Method Summary
 Corpus parseCorpusFromFile(java.lang.String aFileName)
          Parses the XML document and returns the equivalent Corpus.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorpusParser

public CorpusParser()
             throws javax.xml.parsers.ParserConfigurationException,
                    org.xml.sax.SAXException
Zero-argumented default constructor.

Throws:
javax.xml.parsers.ParserConfigurationException - if there is a problem with the parser factory
org.xml.sax.SAXException - if there is a problem when creating the parser
Method Detail

parseCorpusFromFile

public Corpus parseCorpusFromFile(java.lang.String aFileName)
                           throws java.io.IOException,
                                  org.xml.sax.SAXException
Parses the XML document and returns the equivalent Corpus. It reads only files in the 'utf-8' format.

Parameters:
aFileName - a String with the file name to read the XML document from
Throws:
java.io.IOException - if there is a problem when reading the file
org.xml.sax.SAXException - if there is a problem when parsing the XML document