开发者

find elements from the xml file with android

开发者 https://www.devze.com 2023-02-19 12:29 出处:网络
I have an xml file <?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> <etudiants> <etudiant>

I have an xml file

<?xml version="1.0" encoding="ISO-8859-1"?>

<etudiants>
    <etudiant>
        <ncin>00112233</ncin>
        <nom>aaaaa</nom>
        <prenom>bbbbb</prenom>
    </etudiant>

    <etudiant>
        <ncin>11225588</ncin>
        <nom>azeqsd</nom>
        <prenom>wxcqsd</prenom>
开发者_开发技巧    </etudiant>

</etudiants>

The user enter the ncin in an EditText and click search ; the "nom" displayed in an TextVew if Exist

Thank you in advance


You can use different parsers , to parse your xml like SAX , DOM parsers Check here

http://www.ibm.com/developerworks/opensource/library/x-android/

and use it accordingly.

0

精彩评论

暂无评论...
验证码 换一张
取 消