Release Automation

 View Only
  • 1.  XPath How To Insert After First Element

    Posted May 09, 2017 06:18 AM

    Hi,

     

    I'm trying to do two XML Element inserts in a row.

    First shall insert as "First Child", second shall insert as "After First Child".

    The result does not meet my expectations. See below for screenshots and explanation.

     

    test.xml:

    First Action 

    Result:

     

    Looks fine so far. Element <bla> is inserted as First Child element.

     

    Second Action:

    XML element contains a Line Break in this case:

    <Insert2>

    </Insert2>

     

    Result2:

     

    This is where I'm having a different expectation.
    After the first action the "First Child" element is "<bla>".

    So inserting "After First Child" should insert <Insert2> after (below) element <bla>.

     

    My Expectation would be this result:

     

    Do I get somehting wrong here or is this not working as it should?

     

    Thanks & Best regards,

    Max



  • 2.  Re: XPath How To Insert After First Element

    Broadcom Employee
    Posted May 24, 2017 08:01 AM

    Hi Max

     

    To me it looks like this is not working as expected , i did do a quick test and got the same result when

    there is only 1 child , if you have two childs it works fine.

    A workaround for this could be to use the lastchild option .

    Any way i would suggest to raise a support case

     

    regards

    Dirk



  • 3.  Re: XPath How To Insert After First Element
    Best Answer

    Broadcom Employee
    Posted Jun 01, 2017 04:52 AM

    Hi Max
    I believe your questions has been answered, I will mark this as the correct answer.
    When your question is not answered or you still have additional questions please let us know.
    With Kind Regards

    Dirk