Guest User

Untitled

a guest
Jul 17th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. NodeList nl = docEle.getElementsByTagName("Album");
  2.  
  3.             for (int temp = 0; temp < nl.getLength(); temp++) {
  4.                
  5.                 Element al = (Element)nl.item(temp);
  6.                 if (compareSearchwithAlbum(searchName, al)) {
  7.                    
  8.                     NodeList nlist = docEle.getElementsByTagName("Song");
  9.                    
  10.                     for (int i = 0; i < nlist.getLength(); i++) {
  11.                         Element s = (Element)nlist.item(i);
  12.                         searchedSongs.add(new Song (getString(s, "SongTitle"), getString(s, "AlbumTitle"), getInt(s, "Price"), getInt(s, "Year")));
  13.                         // return or do something here
  14.                     }
  15.                 }
  16.                
  17.             }
Add Comment
Please, Sign In to add comment