OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to extract the title-Tag in a Table-Element

  • Thread starter Thread starter CJBNBG
  • Start date Start date
C

CJBNBG

Guest
I am working on a Flutter-App presenting Chart values of my stock. Technically this is done by extracting the values through the element by id.

e.g.

Code:
<td id="delta" class="longprice flop" title="Close 2,635">-10,25%</td>

The example contains the element-id "delta" with value -10,25%. This is perfectly done with

Code:
String? delta = document.getElementById('delta')?.innerHtml.toString();

Unfortunately I am unable to retrieve the title-value, in this example "Close 2,635".

Question is how to retrieve the content "Close 2,635" within Flutter.

Thanks in advance Claus

Code:
var collection = document.getElementsByClassName('longprice flop');
      for (var i = 0; i < collection.length; i++) {
        print( 'i=$i - ${collection[i].attributes!}' );
      }

this produces the following output - title is missing :-(

Code:
i=0 - {id: delta, class: flop longprice}
<p>I am working on a Flutter-App presenting Chart values of my stock. Technically this is done by extracting the values through the element by id.</p>
<p>e.g.</p>
<pre><code><td id="delta" class="longprice flop" title="Close 2,635">-10,25%</td>
</code></pre>
<p>The example contains the element-id "delta" with value -10,25%. This is perfectly done with</p>
<pre><code>String? delta = document.getElementById('delta')?.innerHtml.toString();
</code></pre>
<p>Unfortunately I am unable to retrieve the title-value, in this example "Close 2,635".</p>
<p>Question is how to retrieve the content "Close 2,635" within Flutter.</p>
<p>Thanks in advance
Claus</p>
<pre><code>var collection = document.getElementsByClassName('longprice flop');
for (var i = 0; i < collection.length; i++) {
print( 'i=$i - ${collection.attributes!}' );
}
</code></pre>
<p>this produces the following output - title is missing :-(</p>
<pre><code>i=0 - {id: delta, class: flop longprice}
</code></pre>
Continue reading...
 

Latest posts

Top