0
Get all ID linked to a parent element with lxml python
I have this situation where I need to get all the id in an xml that are linked to a liat of elements. The Xml structure would be. <content id="title001"> <content-link id="brf233" /> <content-link id="de882" /> </content> <content id="brf233"> <content-link id="re23" /> </content> I don't know how to read all the linked elements from the root. It is clearly a tree structure where each id is unique as well. It cannot be graph like structure. I know how to read an element but I don't know how to go deep in the tree. https://code.sololearn.com/cqpSH21c10D4/?ref=app
3 Respostas
+ 1
Okay.
0
I didn't understand ur qstn. Is it u want the values of each id attributes??
0
Yeah, sorry it waa finally solved. I did not go back to this question. And I wanted to get all id of linked elements.