<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def queueEntryToXML(queueEntry):
 """ Turn an instance of a QueueEntry model into an xml data format """


    xmlRoot = etree.Element(QXML + "queueEntry", nsmap=QXML_NSMAP)
    arkTag = etree.SubElement(xmlRoot, QXML + "ark")
    arkTag.text = queueEntry.ark
    oxumTag = etree.SubElement(xmlRoot, QXML + "oxum")
    oxumTag.text = queueEntry.oxum
    urlListLinkTag = etree.SubElement(xmlRoot, QXML + "urlListLink")
    urlListLinkTag.text = queueEntry.url_list
    statusTag = etree.SubElement(xmlRoot, QXML + "status")
    statusTag.text = queueEntry.status
    if hasattr(queueEntry, "harvest_start") and queueEntry.harvest_start:
        startTag = etree.SubElement(xmlRoot, QXML + "start")
        if isinstance(queueEntry.harvest_start, basestring):
            startTag.text = queueEntry.harvest_start
        else:
            startTag.text = queueEntry.harvest_start.strftime(
                TIME_FORMAT_STRING
            )
    if hasattr(queueEntry, "harvest_end") and queueEntry.harvest_end:
        endTag = etree.SubElement(xmlRoot, QXML + "end")
        if isinstance(queueEntry.harvest_end, basestring):
            endTag.text = queueEntry.harvest_end
        else:
            endTag.text = queueEntry.harvest_end.strftime(TIME_FORMAT_STRING)
    positionTag = etree.SubElement(xmlRoot, QXML + "position")
    positionTag.text = str(queueEntry.queue_position)
    return xmlRoot