Topic
2 replies Latest Post - ‏2009-08-14T16:41:08Z by DGawron
TMG_dwalls
TMG_dwalls
9 Posts
ACCEPTED ANSWER

Pinned topic XML variable assignment in an Action List

‏2009-08-04T16:34:01Z |
In this example I am trying to set the first occurrence of the element 'queueName'(using xpath notation). But this doesn't work, is the notation different when using Assignment in an Action List? can a specific occurrence be set, if so what are the syntax rules?

My Example that doesn't work as is:
Assignment!Variables/GetStepElementsFromQueueRequest/GetStepElementsFromQueueRequest/queueName[0]=${Arguments/queue}
Updated on 2009-08-14T16:41:08Z at 2009-08-14T16:41:08Z by DGawron
  • wudongf
    wudongf
    289 Posts
    ACCEPTED ANSWER

    Re: XML variable assignment in an Action List

    ‏2009-08-05T02:20:09Z  in response to TMG_dwalls
    Hi,

    You may post your question to PF forum for a better answer.
    http://www.ibm.com/developerworks/forums/forum.jspa?forumID=889

    What I was told before is that PF does not have full support of XPath, I think that's the cause of your problem
  • DGawron
    DGawron
    34 Posts
    ACCEPTED ANSWER

    Re: XML variable assignment in an Action List

    ‏2009-08-14T16:41:08Z  in response to TMG_dwalls
    For assignments like this you're better off writing Java (LJO method or Method builer) that calls IXml methods directly. The XPath "GetStepElementsFromQueueRequest/queueName[0]" could mean a few different things when used in the context of an assigment. It could mean "replace the first occurence of queueName", "replace the content of the first occurence of queueName", etc. It sounds like the behavior Action List is using isn't what you want. Using Java to call IXml directly gives you the ability to define the exact semantics you need.