Ankit Agarwal - 2016-03-12

I have some set of predefined properties and their corresponding values in a excel format like -

  • PROPNAME1 test-value1
  • PROPNAME2 test-value2

and one input xml that is having various messages. I have to match each PROPNAMES with label value in message/message_type/command/cmd_input/param_block_series/param_block/param/param_name XPath for each messages and params we have in XML and add the new attribute with value as Property-value from excel to the parent of that matching param_name tag. For Example-

I have-

<param type="ENUM" optional="false" listable="false" rangeable="false" description="" default=""> <param_name label="PROPNAME1 " value="test-value1"> </param_name> </param>

i want to make above to :

<param type="ENUM" optional="false" listable="false" rangeable="false" description="" default="" **newAtt = "test-value1"**> <param_name label="PROPNAME1 " value="test-value1"> </param_name> </param>

and return the complete updated XML back from XQuery.Please Suggest some solution.

 

Last edit: Ankit Agarwal 2016-03-13