0
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.

1
Contributor
1
Reply
8
Views
2 Years
Discussion Span
Last Post by sing1006
0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.