Author: jonathan
Date: Mon Jul 21 00:14:31 2008
New Revision: 19722
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19722

Log:
Fixed broken scraper sample.

Modified:
   trunk/mashup/java/xdocs/scraperhostobject.html

Modified: trunk/mashup/java/xdocs/scraperhostobject.html
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/scraperhostobject.html?rev=19722&r1=19721&r2=19722&view=diff
==============================================================================
--- trunk/mashup/java/xdocs/scraperhostobject.html      (original)
+++ trunk/mashup/java/xdocs/scraperhostobject.html      Mon Jul 21 00:14:31 2008
@@ -51,6 +51,7 @@
             <div class="code">
                 <pre>var config =<br/>    &lt;config&gt;<br/>        
&lt;var-def name='response'&gt;<br/>            &lt;html-to-xml&gt;<br/>        
        &lt;http method='get' url='http://ww2.wso2.org/~builder/'/&gt;<br/>     
       &lt;/html-to-xml&gt;<br/>        &lt;/var-def&gt;<br/>    
&lt;/config&gt;;</pre>
             </div>
+            The contents of the variable appear as a property on the Scraper 
object.
         </li>
         <li>The result comes back as a string at present.
             When the result represents XML, not only do you have to parse it 
into
@@ -58,7 +59,7 @@
             The XML constructor does not parse documents, but only node lists, 
and
             rejects the declaration as an illegal processing instruction:
             <div class="code">
-                <pre>var scraper = new Scraper();<br/>result = 
scraper.scrape(config);<br/>// strip off the XML declaration and parse as 
XML.<br/>resultXML = new XML(result.substring(result.indexOf('?&gt;') + 
2));<br/>return resultXML;</pre>
+                <pre>var scraper = new Scraper(config);<br/>var result = 
scraper.response;<br/>// strip off the XML declaration and parse as 
XML.<br/>var resultXML = new XML(result.substring(result.indexOf('?&gt;') + 
2));<br/>return resultXML;</pre>
             </div>
         </li>
         <li>The WebHarvest language &lt;template&gt;

_______________________________________________
Mashup-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to