def serialize(self, stream=None, pretty=False):
return self._serialize(self.node, stream=stream, pretty=pretty)<EOL>
Serialize the contents of the XmlObject to a stream.  Serializes
        current node only; for the entire XML document, use :meth:`serializeDocument`.

        If no stream is specified, returns a string.
        :param stream: stream or other file-like object to write content to (optional)
        :param pretty: pretty-print the XML output; boolean, defaults to False
        :rtype: stream passed in or an instance of :class:`cStringIO.StringIO`