How to separate an id="Form1" and id="Form2" under the two nodes with the same node with the same value;
CodePudding user response:
Before used SAXReaderhttps://www.cnblogs.com/fnz0/p/5538459.html
CodePudding user response:
Can pass index to locate where you are looking for, and then through the string section of the operation,STR="' '& lt; The Form Id="Form1" & gt;
"'
Name="policy number
"The index=STR. Find (name)
Start=STR. Find (' & lt; FormId> ', the index) + 8
End=STR. Find (' & lt;/FormId> ', the index)
Print (STR [start: end]) results: 299338906372016000049