I have an xml file through which I have to retrieve xml document. Below is the xml document i have.
-<orcid-message>
-<orcid-profile type="user">
-<orcid-activities>
-<orcid-works>
-<orcid-work put-code="23938140" visibility="public">
-<work-contributors>
-<contributor>
-<credit-name visibility="public">Tania Maes</credit-name>
-<contributor>
-<credit-name visibility="public">Francisco Avila Cobos</credit-name>
-<contributor>
-<credit-name visibility="public">Franco Liala Manus</credit-name>
I want to retrieve the contributor name: I have tried so far:
contributors_name = (doc['orcid-message']['orcid-profile']
['orcid-activities']['orcid-works']
['orcid-work']['work-contributors']
['contributor']['credit-name'] )
print(contributors_name)
Please tell me where I am going wrong. Thank you.