XML generation and basic KEyServerXML implementation