bcp5190
asked on
how can i use getElementsByTagName with parent where conditions?
<BOOKINFO>
<NAME>xyz</NAME>
<AUTHORS>
<ENGLISH>
<NAME>name1</NAME>
<ENGLISH>
<SPANISH>
<NAME>name2</NAME>
</SPANISH>
</AUTHORS>
</BOOKINFO>
I have xml string similiar to shown as above now
using DOM how can i find name of the author if BOOKINFO.NAME = "xyz"
First choice should be english authour if not only then spenish author
i'm trying something like this
Set ElemList = xmlDoc.getElementsByTagNam e("NAME")
but how can i have name of the authors for only xyz book
or is there any other way i can do this?
<NAME>xyz</NAME>
<AUTHORS>
<ENGLISH>
<NAME>name1</NAME>
<ENGLISH>
<SPANISH>
<NAME>name2</NAME>
</SPANISH>
</AUTHORS>
</BOOKINFO>
I have xml string similiar to shown as above now
using DOM how can i find name of the author if BOOKINFO.NAME = "xyz"
First choice should be english authour if not only then spenish author
i'm trying something like this
Set ElemList = xmlDoc.getElementsByTagNam
but how can i have name of the authors for only xyz book
or is there any other way i can do this?
ASKER
i try it but didn't work i think because AUTHORS is not child of NAME .
AUTHORS is child of BOOKINFO
AUTHORS is child of BOOKINFO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Set ElemList = xmlDoc.documentElement.sel