Serialize as xhtml so that we don't get weird HTML artifacts