5 Replies Latest reply on Aug 10, 2020 8:47 AM by Prathap Reddy

    Not able to parse attribute value to variable.

    sudha pininti New Member

      Hi,

      I have the below input xml data that i am reading using a FileParser to pick the file from.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <properties>

      <entry key="type">Document</entry>

      <entry key="aspects">auditable</entry>

      </properties>

       

      I would like to pick the value 'Document' from this input and assign it to a temp field. This will hence be used later in the process.

      I tried the below XQuery in the formula section of the assignment task:

      for $x in $input.fileEvent[1]/content//*:properties

      where $x/entry[@key='type']

      return $x/entry[@key='type']/data()

       

      Atatched herewith the screenshot.

       

      However, it did not assign any value to the variable. The same XQuery works perfectly and returns me the value 'Document' when i try it using another tool such as BaseX.

       

      Can you tell me what the Xquery should be ?

       

      Thanks.