Service Virtualization

how to delete repeating elements with regular expression ?

  • 1.  how to delete repeating elements with regular expression ?

    Posted Dec 12, 2016 11:51 PM

    In the below scenario, I want to delete all the studentDetail instances from xml.

    Lisa shows all the studentDetails with _1 2 3 4, how can I generalize to delete those nodes.

     

    <req>

    <StudentDetail>

             <StudNo>

             <StuName>

             <StudGrade>

    </StudentDetail>

    <StudentDetail>

             <StudNo>

             <StuName>

             <StudGrade>

    </StudentDetail>

    <StudentDetail>

             <StudNo>

             <StuName>

             <StudGrade>

    </StudentDetail>

    <ClassDetail>

    .

    .

    </ClassDetail>

    </req>