点击父节点获取所有的子节点

//如果是初次加载就只读出一级节点
            Element rootEle = dom.getRootElement();

            //点击父节点获取所有的子节点
            if(!("0").equals(topicId)){
                //获取当前选定的父节点
                Element node = (Element) rootEle.selectSingleNode(".//topic[@id='" + topicId + "']");
                rootEle = node;
            }
           
            return NaviUtil.getUl(rootEle);

你可能感兴趣的:(获取)