This is the task:

Create a translation service.

Customer service to activate the service method as follows:

getWord ("car", "russian", "polish")


The first parameter is the required word, the second is the original language, and the third target language.

The method should return a string with the appropriate word or words separated by commas if there are synonyms.

Data source, the service should use XML documents (the system may have only a few words, in order to test the functionality).


I started by creating an XML file and establishing a connection between Java and XML:

import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;


public class Main {


public static void main(String[] args) throws
ParserConfigurationException, SAXException, IOException{
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
sp.parse ("Servis.xml", new MySaxHandler());
}
}

I have no idea what to do next. Please help.