<command>abc</command>
<Pset name="X_number">
<var name="Y_name">A</var>
<var name="Y_num">6</var>
<var name="Z_name">C</var>
</Pset>
<Pset name="T_num">
<var name="T_num">1</var>
</Pset>
<Pset name="T_num">
<var name="T_num">2</var>
</Pset>
<Pset name="T_status">
<var name="T_status">U</var>
</Pset>
<Pset name="T_status">
<var name="T_status">V</var>
</Pset>
<Pset name="end_matching">
</Pset>
<Pset name="X_number">
Мы должны извлечь из него следующую структуру:
<Event>
<module_num>A</module_num> <here module_num corrosponds to <var name="Y_name">A</var> and display value of Y_name)
<Tnumber>1</Tnumber> (here TNumber(you can give any name, I kept Tnumber to keep it simple) corresponds to first Pset of T_Num and get the value from <var name="T_num">1</var>)
<Tstatus>U</Tstatus> (here Tstatus corresponds to first Pset of T_status and get the value from <var name="T_Status">U</var>)
</Event>
<Event>
<module_num>A</module_num> <here module_num is same as first Event set>
Tnum>2</Tnum> ( Here also it is second one , and there can be multiple )
<Tstatus>V</Tstatus>
</Event>
Module_num будет объединять все события, происходящие из X_number и Tstatus, и Tnum будут связаны на основе их позиции, у нас естьперебирать все T_num / T_status перед запуском другого X_number.