You can easily suppress the <Marker> element if the Marker property is null. Just add a ShouldSerializeMarker() method:
public bool ShouldSerializeMarker()
{
return Marker != null;
}
It will be called automatically by XmlSerializer to decide whether or not to include the element in the output.
As for using the expanded form of the <Marker> element when the string is empty, there's no easy way to do it (you could probably write your own XmlWriter, but it would be a pain). But anyway it doesn't make sense, because <Marker /> and <Marker></Marker> have exactly the same meaning.
<Marker></Marker>representation better or is there a technical reason? It almost never makes a difference (Actually, only the HTML<script>tag comes to my mind - and that's due to the deficiency of browsers).XmlWriterclass.