[Htmlparser-cvs] htmlparser/src/org/htmlparser/util IteratorImpl.java,1.29,1.30 NodeList.java,1.44,1
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-10-05 13:50:00
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/util In directory sc8-pr-cvs1:/tmp/cvs-serv9618/util Modified Files: IteratorImpl.java NodeList.java Log Message: Add bean like accessors for positions on Node, AbstractNode and AbstractNodeDecorator. Handle null page in Cursor. Add smartquotes mode in Lexer and CompositeTagScannerHelper. Add simple name constructor in Attribute. Remove emptyxmltag member, replace with computing accessors in TagNode. Removed ScriptScannerHelper and moved scanning logic to ScriptScanner. Reworked extractImageLocn in ImageScanner Implement extractXMLData in TagScanner. Made virtual tags zero length in TagData. Added push() to IteratorImpl. Added single node constructor to NodeList. Numerous and various test adjustments. Still 133 failures. Index: IteratorImpl.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/util/IteratorImpl.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** IteratorImpl.java 28 Sep 2003 15:33:59 -0000 1.29 --- IteratorImpl.java 5 Oct 2003 13:49:54 -0000 1.30 *************** *** 75,78 **** --- 75,87 ---- /** + * Makes <code>node</code> the next <code>Node</code> that will be returned. + * @param node The node to return next. + */ + public void push (Node node) + { + preRead.insertElementAt (node, 0); + } + + /** * Check if more nodes are available. * @return <code>true</code> if a call to <code>nextHTMLNode()</code> will succeed. Index: NodeList.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/util/NodeList.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** NodeList.java 22 Sep 2003 02:40:15 -0000 1.44 --- NodeList.java 5 Oct 2003 13:49:54 -0000 1.45 *************** *** 51,54 **** --- 51,64 ---- } + /** + * Create a one element node list. + * @param node The initial node to add. + */ + public NodeList(Node node) + { + this (); + add (node); + } + public void add(Node node) { if (size==capacity) |