Java web收获-抓取url
我正在使用WebHarvest。但是,我想从URL中提取数据: 我的代码是:Java web收获-抓取url,java,eclipse,web,web-scraping,webharvest,Java,Eclipse,Web,Web Scraping,Webharvest,我正在使用WebHarvest。但是,我想从URL中提取数据: 我的代码是: <?xml version="1.0" encoding="UTF-8"?> <config> <var-def name="google"> <html-to-xml> <http url="http://derstandard.at/anzeiger/immoweb
<?xml version="1.0" encoding="UTF-8"?>
<config>
<var-def name="google">
<html-to-xml>
<http url="http://derstandard.at/anzeiger/immoweb/Suchergebnis.aspx?Regionen=9&Bezirke=&Arten=&AngebotTyp=×tamp=1363305908912"></http>
</html-to-xml>
</var-def>
</config>
然而,我得到:
对实体Bezirke的引用必须以“;”结尾
我不明白带“;”的网络收获是什么意思 我对网络收获知之甚少,但他们的例子有:
<xpath expression="//a[@shape='rect']/@href">
<html-to-xml>
<http url="http://www.somesite.com/"/>
</html-to-xml>
</xpath>
<http url =".." />
而您的代码
<http url = ".."></http>
也许这是你的问题?不需要结束标记您应该在url中编码ampresands,即使用
&;更改每个和代码>我不确定您将如何获取web,但我建议您使用Jsoup。这真的很简单而且有用。