xml - Web-Harvest: grabbing multiple url's from a list -


what i'm trying multiple webpages predefined list. here code:

<?xml version="1.0" encoding="utf-8"?>     <config>        <script>             <![cdata[                 string[] codes = new string[] {"18","21","24","25","26"};                 setcontextvar("codes", codes);             ]]>       </script>       <loop item="link">             <list>                 <var name="codes" />             </list>             <body>                <var-def name="webpage">                   <html-to-xml>                                                      <http url="${sys.fullurl('http://www.someurl.com/',link)}"/>                               </html-to-xml>               </var-def>              </body>         </loop>     </config> 

and error "variable assignment: codes: can't assign org.webharvest.runtime.variables.listvariable java.lang.string"

what missing here?

please try exmple:

<config>    <var-def name="codes">     <![cdata[<codes>]]>     <![cdata[<code>]]>18<![cdata[</code>]]>     <![cdata[<code>]]>21<![cdata[</code>]]>     <![cdata[<code>]]>24<![cdata[</code>]]>     <![cdata[<code>]]>25<![cdata[</code>]]>     <![cdata[</codes>]]>   </var-def>    <loop item="codesloop" index="i">     <list>       <xpath expression="//code/text()">         <var name="codes"/>       </xpath>     </list>     <body>       <file action="write" path="d:\abc\${codesloop}.txt" charset="utf-8">         <template>${codesloop}</template>       </file>     </body>   </loop> </config> 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -