SGML is very large, influential, and difficult. It has been in important industrial and commercial use for nearly two decades, and there is a important body of expertise and software to go with it.
XML is a lightweight cut-down version of SGML which has enough of its functionality to make it useful but removes all the optional features which made SGML too difficult to program for in a Web environment.