def to_xml(self, depth=0, indent='  '):
        """Return an XML representation of the document"

        :param depth: the initial indentation offset (depth * indent)
        :param indent: the indent for nested elements.
        """
        offset = indent * depth
        result = offset + '<paragraph>\n'
        result += offset + indent + '<sentences>\n'
        for s in self.sentences:
            result += s.to_xml(depth=depth + 1)
        result += offset + indent + '</sentences>\n'
        result += offset + '</paragraph>\n'
        return result