【问题标题】:How to extract html content?I have a HTML page. How to extract the data inside a defined tags and print it in a o/p file.???如何提取 html 内容?我有一个 HTML 页面。如何提取定义标签内的数据并将其打印到 o/p 文件中。???
【发布时间】:2012-10-09 23:13:07
【问题描述】:
            <div class="message">In Arumbakkam - Opp to CMBT bustand is 1.5C/gr. Unless you are particular about the temple, may want to see Arumbakkam, as if you cross Pondamalle rd, you can go to Anna nagar, where, you can get all the extra caricular activities for kids. plus all high end reastaurants and shops</div>

我同意,Arumbakkam 是 AnnaNagar 和 Vadapalani 之间的完美地点。它也位于 Poonamallee 路和 IRR 的交界处。

--------->输出应该是这样的

在 Arumbakkam - Opp 到 CMBT busstand 是 1.5C/gr。除非你对寺庙特别感兴趣,否则可能想看看 Arumbakkam,就像你穿过 Pondamalle rd 一样,你可以去 Anna nagar,在那里,你可以为孩子们提供所有额外的关节活动。加上所有高端餐厅和商店

如何使用 Jsoup 获取此信息。帮我一个简单的程序

【问题讨论】:

    标签: html html-parsing extract jsoup


    【解决方案1】:
     Elements content = Jsoup.connect(link).get().select("div#message");
    

    【讨论】:

      猜你喜欢
      • 2019-09-26
      • 2020-09-12
      • 1970-01-01
      • 1970-01-01
      • 2017-09-19
      • 2021-07-11
      • 2019-08-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多