|
Post by Sylph on Feb 3, 2002 17:42:22 GMT -5
is it possible to have href and src in the same tag? do we have to worry about this?
|
|
|
Post by TheRock on Feb 3, 2002 18:20:31 GMT -5
i think we don't have to worry about href and src in same tag b/c if we find href or src in the tag, we just have to return that link tag ......... is it?? 1 thing really want to make sure is for linkIterator, if the tag is <a href="http://www.yahoo.com"> are we going to return the whole link tag(this is what I did) <a href="http://www.yahoo.com"> or return the link like this www.yahoo.com?
|
|
|
Post by Sylph on Feb 3, 2002 21:45:22 GMT -5
i think a "link" is what they meant in a1, just the www.yahoo.com part.
|
|
|
Post by Random_Death on Feb 3, 2002 21:46:15 GMT -5
Return the whole tag. In other words for your example return: <a href="http://www.yahoo.com">
I've never seen both src and href in any html tags I've worked with but really this shouldn't cause a problem with your code.
|
|
|
Post by Sylph on Feb 3, 2002 21:55:34 GMT -5
notice it says to iterate through the links, not through the link tags.
|
|
|
Post by Yingster on Feb 3, 2002 22:00:45 GMT -5
ya but on the handout it says:
/** * = the next tag that contains an href or src attribute */ public Object next()
|
|
|
Post by Random_Death on Feb 3, 2002 22:04:19 GMT -5
Also, read the newsgroup. There are tons of examples of what LinkIterator is supposed to do. There's so much there that you barely have to figure out to much for yourself to do part 2.
|
|
|
Post by Sylph on Feb 3, 2002 22:06:56 GMT -5
|
|
|
Post by Yingster on Feb 3, 2002 22:09:28 GMT -5
it shouldn't take long to change
|
|
|
Post by Random_Death on Feb 3, 2002 22:11:12 GMT -5
It shouldn't be too hard to fix. To extract the links you probably substringed it out. All you have to do in your program is recognize itz a link tag then just return the whole tag. shouldn't be too hard.
|
|
|
Post by Sylph on Feb 3, 2002 22:15:34 GMT -5
where did u find this stuff on the newsgroup, anyway? i just looked there, but i just see a lot of questions, no answers..
|
|
|
Post by Random_Death on Feb 3, 2002 22:17:59 GMT -5
Hmm... the newsgroup has 465 posts... so I guess it'd be hard to read through. But trust me there are answers to these questions. Especially, since I answer a few of them.
|
|
|
Post by Sylph on Feb 3, 2002 23:11:30 GMT -5
ok, i fixed it and handed it in. is there anything else i should know? the damn thing is called LinkIterator, not LinkTagIterator... so misleading.
|
|
|
Post by Random_Death on Feb 3, 2002 23:45:09 GMT -5
Errr... It does say LinkIterator on the assignment sheet.
|
|
|
Post by TheRock on Feb 4, 2002 16:35:48 GMT -5
do we only need to check if the tag contains an href or src?? if it contains one of this two word then we return that tag.. or is there any other thing we need to check???
|
|