HTML signature leaves big spaces between rows (Gmail App from Outlook) - outlook

This is how it looks in GMail mobile app when sent from Outlook:
How can I avoid those big gaps?
My code is as follows:
<table id="sig" width='320' cellspacing='0' cellpadding='0' border-spacing='0' style="width:320px;margin:0;padding:0;">
<tr>
<td valign='top' width="120" height="48" style="width:120px;height:48px;margin:0;padding:0;vertical-align:top;">
<a style="border:none;text-decoration:none;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/logo.jpg" alt="Crisalix" width='120' height='48' style="border:none;width:120px;height:48px;display:block;">
</a>
</td>
</tr>
<tr>
<td>
<table id="sig1" cellspacing='0' width='320' cellpadding='0' border-spacing='0' style="padding:0;margin:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;mso-line-height-rule:exactly;line-height:11px;color:#b0b0b0;border-collapse:collapse;-webkit-text-size-adjust:none;width:320px;">
<tr style="margin:0;padding:0;">
<td style="width:320px;margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-weight:600;line-height:1.6;font-size:13px;">
<span style="color:#137191">Jaime</span>
</td>
</tr>
<tr style="margin:0;padding:0;">
<td style="width:320px;margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-size:12px;line-height:1">
<span style="color:#555555">Chief Executive Officer</span>
</td>
</tr>
<tr>
<td valign='top' width="27" height='21' style="width:27px;height:1px;margin:0;padding:0;vertical-align:top;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/separator.jpg" alt="Crisalix" width='27' height='21' style="border:none;width:27px;height:21px;display:block;">
</td>
</tr>
<tr style="margin:0;padding:0;">
<td style="width:320px;margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-size:12px;line-height:1.4;">
<div><span style="color:#137191;font-weight:bold">P / </span><span style="color:#555555;"></span></div>
<div><span style="color:#137191;font-weight:bold">A / </span><span style="color:#555555">Parc Scientifique (PSE-A) - EPFL1015</span></div>
<div> <span style="color:#555555"> Lausanne | Switzerland </span></div>
</td>
</tr>
<tr style="margin:0;padding:0;">
<td style="margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-weight:600;line-height:1.6;font-size:13px;width:320px;">
<span style="color:#137191;border:none;text-decoration:none!important;color:#137191;">www.crisalix.com</span>
</td>
</tr>
<tr>
<td valign='top' width="27" height='21' style="width:27px;height:1px;margin:0;padding:0;vertical-align:top;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/separator.jpg" alt="Crisalix" width='27' height='21' style="border:none;width:27px;height:21px;display:block;">
</td>
</tr>
</td>
</table>
</tr>
<tr>
<td valign='top' width="230" height="225" style="width:230px;height:225px;margin:0;padding:0;vertical-align:top;">
<a href='http://www.crisalix.com' title="Crisalix" style="border:none;text-decoration:none;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/signature-banner.jpg" alt="Crisalix" width='230' height='225' style="border:none;width:230px;height:225px;display:block;">
</a>
</td>
</tr>
</table>

Related

How do I scrape data in an html(xml) table row and the values of its children using xpath based on a text string?

Here is the html I am trying to scrape using Xpath:
<table class="ClassGrid" cellspacing="0" cellpadding="0" border="0" id="_ctl0_phMainContent_dgrdClasses" style="border-collapse:collapse;">
<tbody>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 123
<br>
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#104">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">12/12/2018</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl3_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4233&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">1/24/2019</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl4_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4306&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 4</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBoxNone"></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 18</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl6_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4346&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Thursday, August 30</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl7_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4313&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, September 8</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl8_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4330&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Tuesday, September 18</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl9_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4331&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 0000
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#190">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, July 21</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl11_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4242&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Tuesday, August 28</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl12_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4243&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Tuesday, September 25</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl13_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4271&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 456
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#69">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Wednesday, August 1</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl15_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4276&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 25</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl16_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4277&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Thursday, September 13</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl17_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4348&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, October 6</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl18_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4278&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Wednesday, October 31</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl19_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4279&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, November 17</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl20_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4280&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 789
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#223">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 4</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl22_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4347&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 18</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl23_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4305&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Thursday, September 20</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl24_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4332&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
</tbody>
And I am trying to return the value of ClassGridRow1, ClassGridRow2 and ClassGridBox3 if ClassGridRow1 contains the text string
"Address 123"
for example. So far, I have had no luck retrieving anything but just the context node's contents. Can anyone please assist? Most appreciated!
If you have all XPath features available you could select the <div class="ClassGridBox1"> node and mangle the text() with a regex fn:replace:
//tbody/tr/td/div[#class="ClassGridBox1"]/[replace(text(),'(^[a-zA-Z.-]+ [0-9]+).*','$1', 's')]
Demo
Or a bit relaxed with some post text processing:
//tbody/tr/td/div[#class="ClassGridBox1"]/text()

Parsing a table on a webpage without id's or classes - using Nokogiri or xpath

I wish to parse through a epinions.com page to gather some statistics about a few companies. Epinions have almost no id's or classes, so it's quite difficult to parse the site.
I need to loop through all <tr bgcolor="white"> objects. I have put in 2 samples of this.
From the sample 1, I need to extract:
The alt on this line:
<img src="http://img.epinions.com/images/epi_images/ratings/checks_sm_5.0.gif" alt="Store Rating: 5.0" width="79" height="13" border="0">
The href this line:
CHUMBO ROCKS!
The author at this line:
<span class="rgr">by whitey436, Jan 18, 2006
Here is sample 1:
<tr bgcolor="white">
<td style="padding:10px 5px" align="right" valign="top" height="100%">
<table cellspacing="4" cellpadding="0" border="0" width=100% height="100%">
<tr valign="top">
<td class="rkr" nowrap>Overall Rating:</td>
<td width=80>
<img src="http://img.epinions.com/images/epi_images/ratings/checks_sm_5.0.gif" alt="Store Rating: 5.0" width="79" height="13" border="0">
</td>
</tr>
<span class="rgr">
<tr>
<td class="rgr" nowrap>Ease of Ordering:</td>
<td>
<img src="http://img.epinions.com/images/epi_images/e3/quant_5.gif" width=80 height=11>
</td>
</tr>
<tr>
<td class="rgr" nowrap>Customer Service:</td>
<td>
<img src="http://img.epinions.com/images/epi_images/e3/quant_5.gif" width=80 height=11>
</td>
</tr>
<tr>
<td class="rgr" nowrap>Selection:</td>
<td>
<img src="http://img.epinions.com/images/epi_images/e3/quant_5.gif" width=80 height=11>
</td>
</tr>
<tr>
<td class="rgr" nowrap>On-Time Delivery:</td>
<td>
<img src="http://img.epinions.com/images/epi_images/e3/quant_5.gif" width=80 height=11>
</td>
</tr>
</span>
<tr valign="bottom" height="100%">
<td class="rkb" colspan="2">
<div align="center"> </div>
<div align="center"> </div>
</td>
</tr>
</table>
</td>
<td style="padding:10px;" colspan=2 width="100%" align="left" valign="top">
<h2 style="font-family:arial,helvetica,sans-serif; font-size:87%; color:#000000; font-weight:bold; margin-bottom:0px;">
CHUMBO ROCKS!
</h2>
<span style="line-height:110%">
<span class="rgr">by whitey436, Jan 18, 2006
Rated a <span style="color:#000;">Very Helpful Review</span> by the Epinions community</span>
</span>
<span class="rkr">
<div style="padding:5px 0px"> Its just this simple, I tried buying this receiver from another online supplier who had the lowest price only to find they didnt have any of these units and they wanted to sell me extra warranty then tried to sell a different model in stock from Yamaha ...</div>
<b>
Read the full review
</b>
</span>
</td>
</tr>
From the sample 2, I need to extract:
The alt on this line:
<img src="http://img.epinions.com/images/epi_images/ratings/checks_sm_5.0.gif" alt="Store Rating: 5.0" width="79" height="13" border="0">
The href on this line:
Read more
The author at this line:
<span class="rgr">by whitey436, Jan 18, 2006
Rated a <span style="color:#000;">Very Helpful Review</span> by the Epinions community</span>
Here is sample 2:
<tr bgcolor="white">
<td style="padding:10px 5px" align="right" valign="top">
<table cellspacing="4" cellpadding="0" border="0" width=100%>
<tr>
<td class="rkr" nowrap>Overall Rating:</td>
<td width=80>
<img src="http://img.epinions.com/images/epi_images/ratings/checks_sm_5.0.gif" alt="Store Rating: 5.0" width="79" height="13" border="0">
</td>
</tr>
<tr>
<td class='rgr' > </td>
<td>
<img src='http://img.epinions.com/images/epi_images/spacer.gif' width=80 height=11>
</td>
</tr>
</table>
</td>
<td style="padding:10px;" colspan=2 width="100%" align="left" valign="top">
<span class="rgr">Mar 27, 2006 <br>(Not Yet Rated)</span><br>
<span class="rkr"> Very helpful in giving me the information I needed to make a purchase.<br><b>
Read more
</b></span>
</td>
</tr>
Here is some Nokogiri code to print out the information you want using XPath:
xml.xpath("//tr[#bgcolor='white']").each do |el|
# Get the "Overall rating" tr block from the first td and get (first) img alt
puts el.at_xpath("td[1]//tr[td/text()='Overall Rating:']//img/#alt")
# Get the first link from the second td that contains "content" and get href
puts el.at_xpath("td[2]//a[contains(#href, '/content')][1]/#href")
# Get the (first) link that has an itemprop author value and get the href
puts el.at_xpath("td[2]//a[#itemprop='author']/#href")
end
use Nokogiri will be ok.
to get alt, get back all the image tags and keep the img tag with the specified src
imgs = doc.css('img[src="http://img.epinions.com/images/epi_images/ratings/checks_sm_5.0.gif"]')
to get back the href
links = doc.css('a[href*="/content"]')
to get back the author
links = doc.css('a[href*="/user"]')

HTML Agility Pack xpath expression assistance

I have html like the following:
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td height="20" colspan="2">
</td>
</tr>
<tr>
<td height="20" colspan="2" class="fontDestaque2NegritoHome">
MATRÍCULA: PPAAG
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
</td>
<td align="right" valign="middle" class="tx_bd">
</td>
</tr>
<tr>
<td width="35%" align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Fabricante:</span>
</div>
</td>
<td width="59%" align="right" valign="middle" class="tx_bd">
<div align="left">
CESSNA AIRCRAFT</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Modelo:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
T206H</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Número de Série:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
T20608735</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left" class="tx_bold">
Tipo ICAO :
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
C206</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Tipo de Habilitação para Pilotos:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
MNTE</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Classe da Aeronave:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
POUSO CONVECIONAL 1 MOTOR CONVENCIONAL</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Peso Máximo de Decolagem:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
1633 - Kg</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Número Máximo de Passageiros:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
005</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" background="../images/bgPontilhado.gif"
class="tx_bd">
<div align="left">
<img src="../images/bgPontilhado.gif" width="4" height="1"></div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Categoria de Registro:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
PRIVADA SERVICO AEREO PRIVADOS</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Número dos Certificados (CM - CA)</span>:
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
19040</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Situação no RAB:</span><span class="stop_litle">
</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="fontRed">ARRENDAMENTO OPERACIONAL/ALIENACAO FIDUCIARIA</span></div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Data da Compra/Transferência:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" background="../images/bgPontilhado.gif"
class="tx_bd">
<div align="left">
<img src="../images/bgPontilhado.gif" width="4" height="1"></div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Data de Validade do CA: </span>
</div>
</td>
<td width="3%" align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bd">21/05/16</span></div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left" class="tx_bold">
<div align="left">
Data de Validade da IAM:
</div>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bd">110513</span></div>
</td>
</tr>
<tr>
<td height="18" align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Situação de Aeronavegabilidade:</span>
</div>
</td>
<td height="18" align="right" valign="middle" class="tx_bd">
<div align="left">
Normal</div>
</td>
</tr>
<tr>
<td height="18" colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left" class="tx_bold">
Motivo(s):
</div>
</td>
</tr>
<tr>
<td height="18" colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
<blockquote>
<p>
<span class="tx_bold"></span>
</p>
</blockquote>
</div>
</td>
</tr>
<tr>
<td height="18" colspan="2" align="left" valign="middle" class="tx_bd">
Consulta realizada em: 16/8/2012 15:52:45<br>
</td>
</tr>
I want to grab the following text:
Cessna Aircraft
T206H
T20608735
C206
MNTE
POUSO CONVECIONAL 1 MOTOR CONVENCIONAL
1633 - Kg
005
PRIVADA SERVICO AEREO PRIVADOS
19040
ARRENDAMENTO OPERACIONAL/ALIENACAO FIDUCIARIA
21/05/16
110513
Normal
Some of the div's just contain the text I need. Other div's contain a span that contains the text I need. How would I construct the xpath for this?
Use:
//tr/td[#align='right' and #valign='middle' and #class='tx_bd']
/div[#align='left 'and not(*)]
/text()

Content Wont Scroll With Footer And Header Fixed

I have set both the header and the footer to fixed but still cannot get the content to adjust in IPhone.
Here is my layout code
<body>
<div data-role="page" #(Page.Id == null ? string.Empty : "id=" + Page.Id) data-fullscreen="false">
#* #RenderSection("MoreCode", false)*#
#if (IsSectionDefined("Header"))
{
<div data-role="header" data-position="fixed">
#RenderSection("Header", false)
</div><!-- /header -->
}
<div data-role="content">
#RenderBody()
</div><!-- /content -->
<div data-role="footer" data-tap-toggle="false" data-position="fixed">
<div class="center-wrapper">
<table border="0">
<tr>
<td>
<label for="basic">
Place Of Interest
</label>
</td>
</tr>
<tr>
<td>
<table border="0">
<tr>
<td>
Terms of Use
</td>
<td>
<label for="basic">
|
</label>
</td>
<td>
Privacy Policy
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>
Here is my View
<h3 style='color:#4FA600; font-weight:bold;'>#ViewBag.Number</h3>
<table border="1" width="100%">
<tr>
<td align="center" valign=middle style=' font-weight:bold; color:#FFFFFF; background:#4FA600; '>
<label for="basic">Available Documents</label>
</td>
</tr>
<tr>
<td>
<table width="100%" height="100%">
<tr>
<td align="left" valign="middle" style=' font-weight:bold;'>
Type
</td>
<td align="center" valign="middle" style=' font-weight:bold;'>
Description
</td>
</tr>
#{
foreach(var row in Model)
{
<tr>
<td align="left" valign="middle">
#row.DocType
</td>
<td align="center" valign="middle">
#row.Description
</td>
</tr>
}
}
</table>
</td>
</tr>
</table>
Isnt jquerymobile suppose to manually adjust? It renders fine in firefox. What can I do to make the content fully display?
\The issue was I had this in my css:
[data-role=page]{height: 100% !important; position:relative !important;}
I got this code from use theme roller not sure why this messed it up. Maybe someone can clarify would be appreciated

reCAPTCHA keep saying incorrect-captcha-sol

I have this form
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<tr>
<td width="32%" valign="top"> <strong class="main_title">Select Category: </strong></td>
<td width="68%" valign="top" class=""><? $qu="SELECT `id`,`name` FROM `linkvideos_category` WHERE `status` = '1'"; $rs=$Q($qu); ?>
<select name="category" class="blacktext" >
<option>Choose Category</option>
<? while($dis=$F($rs)) { ?>
<option value="<?=$dis['id']?>"> <?=$dis['name'];?></option>
<? } ?>
</select></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title">Upload Image: </strong></td>
<td valign="top" class=""><input type="file" name="imagefile" /> </td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title"> Your Link : </strong></td>
<td valign="top" class=""><input name="link" type="text" size="50" /></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title"> Link Title : </strong></td>
<td valign="top" class=""><input name="linkname" type="text" size="50" /></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title">Description:</strong></td>
<td valign="top"><label>
<textarea name="desc" cols="40" rows="10"></textarea>
</label></td>
</tr>
<tr>
<td valign="top"> <strong class="main_title">Security Code:</strong></td>
<td valign="top">
<? if ($error==3) { ?>
<font color="red">Invalid Code Entered</font>
<?}?>
<?php
require_once('captcha/recaptchalib.php');
echo recaptcha_get_html($public_key);
?></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" class=""><input type="submit" name="Submit" value="Submit" class="btns" onclick="javascript:return check();" /></td>
</tr>
</form>
and i'm verifying the captcha with this
$resp = recaptcha_check_answer ($private_key,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
$error = 3;
echo"<script>window.location='submit_linkvideo.php?error=3';</script>";
}
and every time it's telling me the captchas invalid and saying incorrect-captcha-sol, am I missing something? I've tested it and the recaptcha values arn't being submitted.
Fixed it by ending a table before the form then starting the table again once inside the form.

Resources