[Htmlparser-user] HTMLEnumeration multiple use?
Brought to you by:
derrickoswald
From: Stephen H. <Ste...@tr...> - 2002-11-08 22:46:19
|
I hope this isn't a stupid question, but here it goes anyway..... I have some code where I have to parse through an entire document, then based on what I find, parse through it again. Here is some code: parser = new HTMLParser(url2parse, new DefaultHTMLParserFeedback()); parser.registerScanners(); htmlEnum=parser.elements(); while (htmlEnum.hasMoreNodes()) { //insert processing code here } htmlEnum=parser.elements(); while (htmlEnum.hasMoreNodes()) { //insert secondary processing here } I had expected the 2nd call to htmlEnum to give me a new enumeration which I could step through, but the method htmlEnum.hasMoreNodes() returns FALSE. What am I missing? Thanks, --stephen harrington |