Use &apos; as the escape for single quote in generated xml.

Don't generate a machine name for localhost