Write the object to an xml stream. The object is expected to write itself and its children.
Serialize the object to XML
Extension functions for writing that need different js/jvm implementations
Create a reader that can be used to read the xml serialization of the element.