Use nxml-mode to edit xml file, not sgml-mode.