Hi Kai,
I never use TypeSystem2Xml class.
But, I know that the following piece of code works for me.
Please give it a try and let us know.
TypeSystemDescription tsDesc = TypeSystemUtil
.typeSystem2TypeSystemDescription (your_TypeSystem);
FileOutputStream outTs;
try {
outTs = new FileOutputStream (fileName);
tsDesc.toXML(outTs);
outTs.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
-- Tong