Create an ElementTree representation of the object.

def create_xml(self, useNamespace=False):
        """Create an ElementTree representation of the object."""
        UNTL_NAMESPACE = 'http://digital2.library.unt.edu/untl/'
        UNTL = '{%s}' % UNTL_NAMESPACE

        NSMAP = {'untl': UNTL_NAMESPACE}

        if useNamespace:
            root = Element(UNTL + self.tag, nsmap=NSMAP)
        else:
            root = Element(self.tag)

        # Sort the elements by the index of
        # UNTL_XML_ORDER pre-ordered list.
        self.sort_untl(UNTL_XML_ORDER)
        # Create an XML structure from field list.
        for element in self.children:
            if useNamespace:
                create_untl_xml_subelement(root, element, UNTL)
            else:
                create_untl_xml_subelement(root, element)
        return root