working on XML, for which I will have to loop through and compare the values before or afterwords.
<TRANS DESCRIPTION ="" NAME ="EXPRR" >
<FIELD EXPR ="A1" NAME ="SD" PORTTYPE ="INPUT/OUTPUT"/>
<FIELD EXPR ="V" NAME ="DDS" PORTTYPE ="VARIABLE"/>
<FIELD EXPR ="C" NAME ="SSS" PORTTYPE ="OUTPUT"/>
<FIELD EXPR ="SD" NAME ="SS" PORTTYPE ="VARIABLE"/>
<FIELD EXPR ="XX" NAME ="EEEE" PORTTYPE ="INPUT/OUTPUT"/>
</TRANS>
I would like to put this in the temp memory where I can look through the values and add a sequence. for ex.
seq key value
1 A1 SD
2 V DDS
3 C SSS
4 SD SSS
5 XX EEEE
Once I have this I will have to compare if value exists in the below rows. For example SD exists in below row. so on.
Is there any data structure I can use to perform this operation in Python 3 ?.