Re: [Htmlparser-user] fixed previous problem - (however, new problem)
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2002-05-02 02:42:14
|
Hi Annette, Regarding the first problem, I wrote a testcase, but was unable to = reproduce the error. Can you checkout the latest code from CVS, = (HTMLImageScanner), and take a look at the testcase = testImageTagOnThreeLines(). This test case passes. It ought to fail if = there is a problem in the parsing.=20 Meanwhile I am taking a look at the second issue. Regards, Somik =20 ----- Original Message -----=20 From: Doyle, Annette=20 To: htm...@li...=20 Sent: Thursday, May 02, 2002 5:06 AM Subject: [Htmlparser-user] fixed previous problem - (however, new = problem) Fixed: <td rowspan=3D3><img height=3D49=20 =20 alt=3D"Central Intelligence Agency, Director of Central = Intelligence"=20 =20 src=3D"graphics/images_home2/cia_banners_template3_01.gif"=20 =20 width=3D241></td> =20 by changing HTMLTag as follows: public static int incrementCounter(HTMLReader reader, int = state, int i, HTMLTag tag) { String strLine =3D null; if ((state=3D=3DTAG_BEGIN_PARSING_STATE || = state =3D=3D TAG_IGNORE_DATA_STATE) && = i=3D=3Dtag.getTagLine().length()-1) { // We need to continue parsing to = the next line ; while ((strLine =3D = reader.getNextLine()).length() =3D=3D 0); = //tag.setTagLine(reader.getNextLine()); tag.setTagLine(strLine); // convert the end of line to a = space // The following line masked by = Somik Raha, 15 Apr 2002, to fix space bug in links tag.append('\n'); i=3D-1; } =20 return ++i; } =20 NEW PROBLEM in following: =20 <div align=3D"center"><font face=3D"Arial,"helvetica," = sans-serif=3D"sans-serif" size=3D"2" color=3D"#FFFFFF"><a = href=3D"/index.html" link=3D"#000000" vlink=3D"#000000"><font = color=3D"#FFFFFF">Home</font></a>=20 | <a href=3D"/cia/notices.html" link=3D"#000000" = vlink=3D"#000000"><font color=3D"#FFFFFF">Notices</font></a>=20 | <a href=3D"/cia/notices.html#priv" link=3D"#000000" = vlink=3D"#000000"><font color=3D"#FFFFFF">Privacy</font></a>=20 | <a href=3D"/cia/notices.html#sec" link=3D"#000000" = vlink=3D"#000000"><font color=3D"#FFFFFF">Security</font></a>=20 | <a href=3D"/cia/contact.htm" link=3D"#000000" = vlink=3D"#000000"><font color=3D"#FFFFFF">Contact Us</font></a> | <a href=3D"/cia/sitemap.html" link=3D"#000000" = vlink=3D"#000000"><font color=3D"#FFFFFF">Site Map</font></a> | <a href=3D"/cia/siteindex.html" link=3D"#000000" = vlink=3D"#000000"><font color=3D"#FFFFFF">Index</font></a> | <a href=3D"/search" link=3D"#000000" vlink=3D"#000000"><font = color=3D"#FFFFFF">Search</font></a>=20 </font></div> =20 Stops at=20 TAG LINE FOUND <div align=3D"center"><font = face=3D"Arial,"helvetica," sans-serif=3D"sans-serif" size=3D"2" = color=3D"#FFFFFF"><a href=3D"/index.html" link=3D"#000000" = vlink=3D"#000000"><font color=3D"#FFFFFF">Home</font></a>=20 LINE is <div align=3D"center"><font face=3D"Arial,"helvetica," = sans-serif=3D"sans-serif" size=3D"2" color=3D"#FFFFFF"><a = href=3D"/index.html" link=3D"#000000" vlink=3D"#000000"><font = color=3D"#FFFFFF">Home</font></a>=20 POSITION IS 26 TAGLINE 197 Process completed. =20 Annette Doyle =20 |