For the test of halogens, it is necessary to remove sodium cyanide and sodium sulphide from the sodium extract if N and S are present. It is possible by boiling sodium extract with cocn. HNO3 as follows NaCN+HNO3→NaNO3+HCN↑ Na2S+2HNO3→2NaNO3+H2S↑