网址在这里
http://stock.sina.com.cn/stock/quote/sha0.html我需要循环取出(程序打印出也行)第一列和第2列的数据比如 600000 普发银行
     600001 邯郸钢铁谢谢

解决方案 »

  1.   

    以前用过的一部分代码,你改改就可以了    Parser parser = Parser.createParser(htmlcontent,"GBK");
      String filterStr = "table";
      NodeFilter filter = new TagNameFilter(filterStr);
      NodeList tables = parser.extractAllNodesThatMatch(filter);
      TableTag tabletag = (TableTag) tables.elementAt(0);
       for(int i=1;i<tabletag.getRowCount();i++)
      {
        TableRow row = tabletag.getRow(i);
        for(int j=1;j<row.getColumnCount();j++)
        {
          String planValue= row.getColumns()[j].childAt(1).getText();
        }
    }