Search code examples
androidxmlxmlpullparser

android parser xml with xmlpullparser get need element


i don't know why I can't post my code.
so this is my problem.
this is xml

enter image description here

this is xmlpullparser to get natalie img

enter image description here

this is result
enter image description here

but result get img of natalie and phil like image I post. why that?
and how to get just img of natalie.
thank you for reading.


Solution

  • I believe you need to set check to false in:

    if(check==true){
    // do your work
    check=false;
    }