NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HTML Text Pattern Matching

The following sample demonstrates the SDL for the an alternative GetStockDetails web service method that is invoked using the URL: http://stockquote.com/GetStockQuote.asp that returns an HTML page as a result. In addition to invoking the page, the below SDL indicates that the LastPrice and OpenPrice values should be scraped and returned as a result:

<?xml version="1.0"?>
<serviceDescription xmlns:s0="http://tempuri.org/main.xsd" xmlns:s1="" name="Investor" targetNamespace="" xmlns="urn:schemas-xmlsoap-org:sdl.2000-01-25">
  <httpget xmlns="urn:schemas-xmlsoap-org:get-sdl-2000-01-25">
    <service>
      <requestResponse name="GetQuote" href="http://moneycentral.msn.com/scripts/webquote.dll">
        <request>
         <param name='Symbol'/>
        </request>
        <response>
         <text>
          <match name='Last' pattern='Last&lt;/TD&gt;.*?;(.*?)&lt;/B&gt;'/>
          <match name='Change' pattern='Change&lt;/TD&gt;.*?;(.*?)&lt;/B&gt;'/>
         </text>
        </response>
      </requestResponse>
    </service>
  </httpget>
</serviceDescription>