there is a *.sgm file. It is my data set I want to convert it to any other type of data set, which make me able to have access to it with program like WEKA. Weka mainly support *.arff file.
SGML is the precursor standard to XML, which is often thought of as a simplified version of SGML. Depending on how it was authored, you can probably rename it to .xml and do some minor editing to make it valid XML.
SGML has several features, such as tag minimization, that aren't in XML. For example (IIRC), these would be equivalent to an SGML parser:
(I might have the syntax slightly wrong for the first one, it's been quite a while.)
SGML can also imply the presence of required elements, something that XML doesn't do (you'd have to explicitly include them).
First step would be to grab a text editor (or command-line tool like xmlwf), rename it to .xml, and try cleaning it up until you run out of syntax errors. Text processing tools like perl might make your life easier if the same sorts of errors happen many times (you didn't mention how large your SGML file was).