Customer Portal

XMLExtract - copying parent fields to child when parent fields are present after child element

Comments 1

  • Avatar
    Vladimir Barton
    0
    Comment actions Permalink
    Hello,
    as you rightly indicated, using the XMLExtract in this use case is not an ideal solution due to the way SAX parsing of XML files works. I have attached an example graph and 2 input files to demonstrate the following:

    • phase 0 - using XMLExtract to push the 'D001' value into the 'deptRef' child field is not viable

    • phase 1 - using the same mapping of XMLExtract but with a slightly different input file (input2.xml), you can see that because the department id comes earlier than the child elements, it is possible to map the parent field to the child easily

    • phase 2 - using XMLReader to push the 'D001' value into the 'deptRef' child field is perfectly viable

    Kind regards,

Please sign in to leave a comment.