def get_lazy_node(self, path='', add_ns=True):
        logging.debug('get_lazy_node: ' + path)
        root = ET.Element('root')
        if self.cxml is None:
            return root

        cxml_root = self.cxml.getroot()

        if path == '':
            node = self.get_lazy_node_internal(cxml_root)
            nslist = [c.get('prefix') + ',' + c.text for c in cxml_root if c.tag == 'namespace']
            node.set('namespaces', '|'.join(nslist))
            node.set('name', self.modulename)
            root.append(node)
            return root

        # move root node to requested node
        elements = path.split('/')
        for name in elements[1:]:
            for child in cxml_root:
                if child.get('name', '') == name:
                    cxml_root = child
                    break

        for child in cxml_root:
            if child.tag == 'node':
                node = self.get_lazy_node_internal(child, path)
                root.append(node)

            if child.tag == 'namespace' and add_ns:
                if cxml_root.get('prefix', '') == child.get('prefix'):
                    child.set('default', 'true')
                root.append(child)
        return root
Test get query parameters dict.
dataset/ETHPy150Open CiscoDevNet/yang-explorer/server/explorer/utils/cxml.py/Cxml.get_lazy_node--crossover with--dataset/ETHPy150Open NateFerrero/oauth2lib/oauth2lib/tests/test_utils.py/UtilsTest.test_url_query_params