def METHOD_NAME(self, xmltext):
    """
    Parse the given XML string which is the content of a OCS inventory.
    """
    self.logger = logging.getLogger()
    xml = None
    try:
        xml = parseString(xmltext)
    except expat.ExpatError, e:
        self.logger.error("Can't parse inventory XML string")
        if expat.errors.XML_ERROR_INVALID_TOKEN in str(e):
            self.logger.error('The XML string may use a wrong encoding')
        else:
            # Unhandled error, just re-raise it
            raise e
    if not xml:
        # Let's try another encoding
        xml = self.parseSafe(xmltext)
    inventory = {}
    for tablename in self.tables:
        in_network = tablename == u'NETWORKS'
        try:
            dbtablename = self.tables[tablename][0]
            inventory[dbtablename] = []
            #tag node list
            for tag in xml.getElementsByTagName(tablename):
                entry = {}
                if in_network:
                    # Skip lo interface and network device with a 127.x.x.x
                    # address.
                    try:
                        netif = tag.getElementsByTagName('DESCRIPTION')[0].childNodes[0].nodeValue
                    except:
                        netif = ''
                    try:
                        ip = tag.getElementsByTagName('IPADDRESS')[0].childNodes[0].nodeValue
                    except:
                        ip = ''
                    if netif == 'lo' or ip.startswith('127.'):
                        self.logger.debug('Skipping computer local interface from inventory')
                        continue
                for fieldname in self.tables[tablename][1]:
                    try:
                        field = tag.getElementsByTagName(fieldname)[0]
                        dbfieldname = self.tables[tablename][1][fieldname]
                        entry[dbfieldname] = field.childNodes[0].nodeValue
                    except IndexError:
                        pass
                inventory[dbtablename].append(entry)
        except IndexError:
            pass
    registerval={}
    for EntryRegister in inventory['Registry']:
        for EntryRegister1 in EntryRegister:
            if EntryRegister1 != 'Value':
                registerkey=EntryRegister[EntryRegister1]
            else:
                registerval[registerkey]=EntryRegister[EntryRegister1]
    inventory[u'RegistryInfos']=[registerval]
    return inventory