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

31-07-2009

Hi,

I think you have put correct options. Here are my preferences in easier to harder order.

4. Dont use attributes, only use elements

2. Create the ID attribue ahead of time, and just leave it blank ( This has to be done outside of orchestration or you'll be back to square one) (But you can always use option 3 for this to make it simpler)

3. Do the manipulation and coerce to xml

1. Use a dsc to do xml manipulation. I know XSLT can do this but I find XQuery component much easier to do xml manipulation.

Parth Pandya

Blog: http://blog.pandyaparth.com