Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Workbench
Viewing all articles
Browse latest Browse all 69588

Set value with XPath dynamically

$
0
0

Dear All,

 

I am wonder if the following is possiable with Set Value service using XPath, any *simple* workaround is also welcome too.

 

If I have a variable myXML =

<root>

<item region="One">1</item>
<item region="Two">2</item>

</root>

 

I can reference to /root/item[1] by:

set /process/@myNum = 1

set /process/@dummy  = /process_data/myXml/root/item[number(\process\@myNum)]


But how can I access /root/item[@region="One"] ?

 

I tried the following but all failed:

1)

set /process/@myString = @region="One"

set /process/@dummy  = /process_data/myXml/root/item[string(\process\@myString)]

 

2)

set /process/@myString = One

set /process/@dummy  = /process_data/myXml/root/item[@region='string(\process\@myString)']

 

And are there any way to set a variable using template string? (i.e. You name is {$/process/@yourName$} )

 

Regards

Bill


Viewing all articles
Browse latest Browse all 69588

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>