abstract WriteXML