这是xml代码,我想用javascript编写代码,使用DOM获取父亲,母亲,女儿和儿子的名字------->(ali,mona,ghada和mohamed)
任何人都可以帮助我吗?
<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>