Set XML attribute from SetValue using Xpath

Avatar

Avatar

The_Flex_Viking

Avatar

The_Flex_Viking

The_Flex_Viking

19-05-2009

Is there a trick to assigning a value to an attribute of an element in an XML variable using XPATH inside a setValue activity?  When I try something like

Location

/process_var/xml_var/test/@ID

Expression:

/process_var/test_value

it complains about the @ sign in the location assignment.  I seem to be able to retrieve attributes just fine.

View Entire Topic

Avatar

Avatar

parth_pandya

Avatar

parth_pandya

parth_pandya

30-07-2009

Hi,

I think you are right. The setValue will create the element if it does not exist. BUT that's not the case with the attribute. I also couldn't get the setvalue operation to create the attribute.

In your last post what are you trying to do? Do you want to assign attribute value to Date element? Creating ID element as child element of Date still has the same issue when you want to create element attribute on at runtime.