Topic: REST to Variable and XPath Functions

In attempting to do useful things with the new URL request module, it would be VERY helpful if I could save the XML (or JSON or whatever) to a variable and then use an XPath module to extract data from that saved value.

Consider Bing's response XML, which is a typical multi-value, multi-level XML document.  As it is right now, I can only pull a single set of things from this and then, if I want more, I need to go and perform the service call AGAIN.  If I had an XPath module, I could save the result into a variable, and then perform multiple XPath calls to retrieve multiple parts of the document.

I think this would be a fairly easy add for you guys.

Thanks,
Dan Rudman
OnStar

Re: REST to Variable and XPath Functions

Hi Daniel,

Thanks for all your feedback.  This is an interesting idea, and we've added it to our internal list of feature requests to be considered for a future release of QuickFuse.

Regards,
The QuickFuse Team

Re: REST to Variable and XPath Functions

Daniel,

Just to explore this a little more, would the reason you wouldn't want to re-fetch the XML be one of reducing latency, or side effects on the server side?

Right now you can store the raw text of a request by using the "text" return type of the Fetch from URL module.  Would your ideal module simply re-parse this content with different options?

Thanks,
QuickFuse Team

Re: REST to Variable and XPath Functions

Latency is definitely one reason, side effects is another.  However, if you had a way of operating XPath on the stored variable, that would be sufficient for me personally.

Re: REST to Variable and XPath Functions

I was exploring this more with Dan. In one particular case a user submits a query to Bing expecting to get an expected result in one xPath. If that request fails, bing returns an informative string back, but it's currently in a separate xpath. Having the ability to dynamically do an xPath on a result would help in solving error conditions.