for(int i =0;i<movielist.getLength(); i++){
        Node m=movielist.item(i);
        if(m.getNodeType()==Node.ELEMENT_NODE){
        Element movie = (Element) m;
        String movieID = movie.getAttributes("movie id");

        NodeList mnamelist=movie.getChildNodes();
        for(int j=0;j<movielist.getLength(); j++){
        Node n = mnamelist.item(j);
        if(n.getNodeType()==Node.ELEMENT_NODE){
        Element name = (Element) n;
        //System.out.println("MovieID: "+ movie id + name.getTagName()+ ": "+ name.getTextContent());
        }
        }
        }
    }

it gave me error of actual and formal argument lists differ in length in code line 5.

problem solve, find out im using wrong command for getAttributes. should be getAttribute.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.