简体   繁体   中英

How can I solve this exercise?

This is xml code and I want to write code with javascript using DOM to get the father, mother, daughter and son names ------->(ali,mona,ghada and mohamed)

Can any one help me?

<family>
    <grandfather>Ibrahim
            <father job="Engineer">Ali
                 <mother>mona</mother>
                 <daughter age="23" job="ITI student">ghada</daughter>
                 <son age="21" sport="football">mohamed</son>
            </father>
         <uncle>Alaa</uncle>
         <uncle>reda</uncle>
         <aunt sons="2">layla</aunt>
    </grandfather>
</family>

看看这个这个

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM