Home > Back-end >  O great god advice on how to obtain the following XML message node values under!!!!!!!!!!!
O great god advice on how to obtain the following XML message node values under!!!!!!!!!!!

Time:12-29

299338906372016000049 & lt;/FormId>
Insurance application & lt;/FormName>

PAP0001 & lt;/FormId>
Temporary certificate & lt;/FormName>


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 SAXReader


https://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;
299338906372016000049 & lt;/FormId>
Insurance application & lt;/FormName>

PAP0001 & lt;/FormId>
Temporary certificate & lt;/FormName>
"'
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
  • Related