Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


GrahamG
2013-11-28T14:31:18Z
Dear all,

I am trying to get the root node name of an XML file using the 'read node' task. In the example below, I want to get Order

<Order>
<Detail>
<OrderNumber>1</OrderNumber>
</Detail>
</Order>


I believe this is accomplished using function "name(/*)" however this gives a hard error when running the task.

1) Is this the correct method?
2) What version of Xpath is supported? Are functions supported?



Thank you


Graham

Sponsor
Forum information
Support
2013-11-28T17:51:40Z
Not sure about xpath version but I am sure it supports latest.

Actually, if you already have xml like this it is very easy to pick up the value with the Xpath browser in VisualCron.

Just create a variable where you paste this value in. Use the Variable in the Task and click on the browse button. Click down to the OrderNumber node. Now you get the correct xpath query which you can use.

This is the one I found:

/Order[1]/Detail[1]/OrderNumber[1]
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
GrahamG
2013-12-06T09:02:36Z
Hi Henrik,

THanks for the response, but that doesnt give me what I wanted.

I need to be able to retrive the root node name, in the exmaple this would be "Order".

The method of doing this is with the function "name(/*)" according to Google.

Thank you


Graham
Support
2013-12-06T10:03:09Z
We investigated this and currently we are using the xml navigator for finding nodes. However, for you we did an "Evaluate" alternative that lets you return the result of a specific function. It will probably be included in 7.0.8.

Support attached the following image(s):

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2013-12-06T15:27:35Z
7.0.8 have now been published online for download.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top