I want to export questions from ETS Viewer to another format. Does ETS Editor support exporting questions to another format such as XML?
ETS Editor provides a powerful export facility that can be used to export questions to any format including an XML file.
Since there can be numerous formats for question data, ETS Editor abstracts out the question data using a Java class named etsloader.NonETSQuestion. This class is available in etseditor.jar. It is a very straight forward data object that has various fields pertaining to a question such as problem statement, options, explanation, code, toughness, and section. etseditor.jar also contains an interface named etsloader.AnyFormatQuestionExporter. This has only one method as shown below.
void setQuestions(ArrayList<NonETSQuestion> questionsList,
HashMap<String, byte> images,
HashMap<String, String> sectionObjectives,
Now, all you need to do is to write a java class that implements this interface. In your class, you dump the question data is any format you want including XML.
Use ETS Editor's Tools->Export menu and select your class to export all your questions. This option is enabled when you have a question bank already opened for editing. Click on the Help button on the resulting dialog to learn how it works. Here is a Sample XML Exporter.