Don't include undefined elements in encoded XML.