hky_site_model_to_xml_state function

Converts a site model to XML, used in the state section