(: How to run this example: (1) Download and Install TigerLogic XDMS and Stylus Studio XML Enterprise Edition. (2) Save this XQuery file, load it into Stylus Studio's XQuery Editor. (3) Ensure that you have specified the TigerLogic XDMS XQuery Processor in the XQuery Processor tab in XQuery Scenario Properties Window. (4) Run the XQuery and browse the results. Example Description: This XQuery accesses makes a Web service call, then formats the results into an HTML table within an XQuery expression. :) import service namespace stock = 'http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx?WSDL#StockQuotesSoap' operation GetStockQuotes port StockQuotesHttpGet; declare namespace sw = 'http://swanandmokashi.com'; { for $q in stock:GetStockQuotes('PRGS MSFT IBM')/sw:Body/sw:ArrayOfQuote/sw:Quote return }
Company Name Last Quote
{$q/sw:CompanyName} {$q/sw:StockQuote}