|
Post by Sylph on Feb 5, 2002 23:42:35 GMT -5
returned tags: <tag> </tag>
|
|
Poopo
Full Member
Posts: 43
|
Post by Poopo on Feb 5, 2002 23:49:07 GMT -5
what about the gaps though?
|
|
|
Post by Sylph on Feb 5, 2002 23:57:18 GMT -5
- How bout gaps in the HTML file? do we have to account for that? <html> <--- gap? <header> what do u mean? find a < and get it plus everything before and including the >. use paul gries' webpage as a sample.
|
|
|
Post by Yingster on Feb 5, 2002 23:58:21 GMT -5
guess u ignore them since they're not tags ??
|
|
Poopo
Full Member
Posts: 43
|
Post by Poopo on Feb 6, 2002 0:38:43 GMT -5
but gaps are null ... your file is supposed to end when they're null ?
it says that "... that implements interface java.util.Iterator and that iterates through the tags in a BufferedReader until readLine() returns null."
....................................................
if you were to consider them, then how would you differenciate the end of the file and a gap ?
|
|
|
Post by Yingster on Feb 6, 2002 1:17:37 GMT -5
dunno trying to figure it out
|
|
Poopo
Full Member
Posts: 43
|
Post by Poopo on Feb 6, 2002 1:31:08 GMT -5
just not sure because he says that if we want extra samples to play with .. then we should use his website html .. and his website html ~pgries.htm is filled with gaps !!! What does everyone else think? and how did everyone else do it ?
|
|
|
Post by Bahamut on Feb 6, 2002 2:13:13 GMT -5
>>>but gaps are null ... your file is supposed to end when they're null ? <<<
Gaps aren't null. Null is end of file.
|
|
Poopo
Full Member
Posts: 43
|
Post by Poopo on Feb 6, 2002 2:43:19 GMT -5
sorry .. gaps isn't a very precise word
hmm... a blank line?
<html>
<head>
if you go readLine() between <html> and <head> .. then it gives a null.
|
|
|
Post by Yingster on Feb 6, 2002 2:47:00 GMT -5
it shouldn't affect anything as long as u keep looping until u find the end tab
|
|
|
Post by Bahamut on Feb 6, 2002 2:58:49 GMT -5
>>>if you go readLine() between <html> and <head> .. then it gives a null. <<<
A blank line/gap is called an empty string. Null and empty string are not the same.
String s = "": //an empty string String s = null; //a string that points to nothing. ie. null
|
|
|
Post by Yingster on Feb 6, 2002 15:06:38 GMT -5
I see what u mean now Poopo since i have the same prob now, ack~
somehow it still recognizes a blank line as null ?_?
|
|
Poopo
Full Member
Posts: 43
|
Post by Poopo on Feb 6, 2002 15:18:00 GMT -5
it does.. Bahamut have you tried with yours? cause unless my readLine() thing is messed up .. .that's what its doing..
I thought it wouldn't read as a null .. but so far what I'm thinking is wrong !
|
|
|
Post by Bahamut on Feb 6, 2002 16:04:10 GMT -5
>>>Bahamut have you tried with yours? cause unless my readLine() thing is messed up .. .that's what its doing.. <<< I tested for every conceivable combination. I've tested this case and it works. Try checking your IF statements, it sounds like your problem is within those buggers. But remember, tattoo this in your brain, that an empty String and a null String are not the same.
|
|
Poopo
Full Member
Posts: 43
|
Post by Poopo on Feb 6, 2002 20:32:37 GMT -5
he he.. I guess I should have tested it with my new code.. i was whining and i never tested it .. well it works now.. don't know what it was before... maybe just something I ate
|
|