Hi guys,<br><br>I use the GetElementById in PHP with sucess, but in FPC I not know how use.<br><br>In PHP I use (with sucess):<br><br>...<br>$dom = new DOMDocument();<br> @$dom->loadHTML($data);<br> $return = @$dom->getElementById('currency_converter_result')<br>
->getElementsByTagName('span')->item(0)->firstChild->wholeText;<br clear="all">...<br><br>In FPC I try (but without sucess):<br><br>...<br>var<br> VHTMLDocument: THTMLDocument = nil;<br>begin<br>
try<br>
ReadHTMLFile(VHTMLDocument, '../HTML/index.htm');<br> ShowMessage(VHTMLDocument.GetElementById('currency_converter_result'<br> ).GetElementsByTagName('span').Item[0].FirstChild.TextContent);<br>
...<br><br>I found a 'generic' solution:<br><br>....<br> ShowMessage(VHTMLDocument.GetElementsByTagName('div').Item[5].TextContent); // This is a unique alternative? :o<br>....<br><br>Any idea? The GetElementById function works? :/<br>
<br>Project to reproduce my problema in attached (with the HTML and PHP files).<br><br>( sorry for my bad english ^^' )<br><br>Thanks.<br><br>-- <br><font color="#000080" face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Silvio Clécio</b></font><br>
<font color="#000000" face="Verdana" size="1"><b>Blog.</b> <a href="http://blog.silvioprog.com.br" target="_blank"><span style="color: rgb(51, 51, 255);">blog.silvioprog.com.br</span></a><br></font><font color="#000000" face="Verdana" size="1"><b>Twitter.</b> <a href="http://twitter.com/silvioprog" target="_blank">twitter.com/silvioprog</a></font><br>