I have a following sample sgml data from my .sgm file and I want convert this in to xml
xyz <
Maybe you can use the osx SGML to XML converter. It is part of the OpenSP package (based on SP, originally written by James Clark).