@staticmethod
def _get_disk_xml(xml, device):
    'Returns the xml for the disk mounted at device.'
    try:
        doc = etree.fromstring(xml)
    except Exception:
        return None
    ret = doc.findall('./devices/disk')
    for node in ret:
        for child in node.getchildren():
            if (child.tag == 'target'):
                if (child.get('dev') == device):
                    return etree.tostring(node)
Returns the xml for the disk mounted at device.
@staticmethod
def _get_disk_xml(xml, device):
    
    try:
        doc = etree.fromstring(xml)
    except Exception:
        return None
    ret = doc.findall('./devices/disk')
    for node in ret:
        for child in node.getchildren():
            if (child.tag == 'target'):
                if (child.get('dev') == device):
                    return etree.tostring(node)