void showstudent() {
        try {        
        expr = xpath.compile("//student/@regno");
        result = expr.evaluate(doc, XPathConstants.NODESET);
        nodes = (NodeList) result;
        String tr;
        boolean fr=false;
        for(int i=0;i<nodes.getLength();i++) {
                tr=nodes.item(i).getNodeValue();
                if(type==false) {
                listmodel.addElement(tr);
                 }
                else if(type==true) {
                    System.out.println(":: "+tr+" "+sreg);
                    if(tr.matches(sreg)) {
                        System.out.println(" matched");
                        listmodel.addElement(tr);
                        fr=true;
                    }
                }
            }
        jList1.setModel(listmodel);
        if(fr==false && type==true) {
            JOptionPane.showMessageDialog(this,"Reg no dont exist","Error!!",JOptionPane.ERROR_MESSAGE);
            this.dispose();
         }
        }

        catch(Exception e) {
            System.out.println("showstudent: "+e.getMessage());
        }

    }