Pull the numbers out of java jsoup



  • I hope the last question is today. Using the library jSoup

    That's the point. How do you extract the numbers from all the xml(s) from a specific current that no longer appear in the code? I honestly didn't find a lot of answers.

    Document doc = Jsoup.connect("http://bcs-express.ru/kotirovki-i-grafiki/gazp").get();
    Element title = doc.body();
    System.out.println(title); 
    

    How to get out of this whole page of what's in the current.

    <div class="emet_index" data-placeholder="current">138,05</div>
    

    The figures are particularly interesting. 138.05

    Give me an example or a code. I didn't get the paperwork straight!



  • String html = "<div class='emet_index' data-placeholder='current'>138,05</div>";
    Document doc = Jsoup.parse(html);
    Element link = doc.select("div").first();
    System.out.println(doc.body().text());
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2