

def parse(inFileName):
    doc = parsexml_(inFileName)
    rootNode = doc.getroot()
    (rootTag, rootClass) = get_root_tag(rootNode)
    if (rootClass is None):
        rootTag = 'DNS_Query'
        rootClass = DNSQueryObjectType
    rootObj = rootClass.factory()
    rootObj.build(rootNode)
    doc = None
    return rootObj

dataset/ETHPy150Open CybOXProject/python-cybox/cybox/bindings/dns_query_object.py parse/original