Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser
In directory sc8-pr-cvs1:/tmp/cvs-serv18016
Modified Files:
Parser.java
Log Message:
Fix bug #798552 Sample for node iterator incorrect
DocComment changes only.
Tabs converted to spaces.
Index: Parser.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/Parser.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** Parser.java 24 Aug 2003 21:59:41 -0000 1.56
--- Parser.java 1 Sep 2003 13:53:46 -0000 1.57
***************
*** 96,102 ****
* // In this example, we are registering all the common scanners
* parser.registerScanners();
! * for (NodeIterator i = parser.elements();e.hasMoreNodes();) {
! * Node node = i.nextNode();
! * node.print();
* }
* </pre> Below is some sample code to parse Yahoo.com and print only the text
--- 96,102 ----
* // In this example, we are registering all the common scanners
* parser.registerScanners();
[...1259 lines suppressed...]
! return parser;
! }
! /**
! * @return String lineSeparator that will be used in toHTML()
! */
! public static String getLineSeparator() {
! return lineSeparator;
! }
! public StringNodeFactory getStringNodeFactory() {
! if (stringNodeFactory == null)
! stringNodeFactory = new StringNodeFactory();
! return stringNodeFactory;
! }
!
! public void setStringNodeFactory(StringNodeFactory stringNodeFactory) {
! this.stringNodeFactory = stringNodeFactory;
! }
}
|