[Htmlparser-cvs] htmlparser/src/org/htmlparser/lexer/nodes RemarkNode.java,1.11,1.12 StringNode.java
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-11-08 21:30:59
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/nodes In directory sc8-pr-cvs1:/tmp/cvs-serv18855/src/org/htmlparser/lexer/nodes Modified Files: RemarkNode.java StringNode.java TagNode.java Log Message: Implement generic node filtering. Added the NodeFilter interface and the filter package. Sideline tag specific scanners; tags now use only one scanner of each type, TagScanner or CompositeTagScanner (except for ScriptScanner). Obviated PeekingIterator by moving the META tag semantics to doSemanticAction, much simpler, old IteratorImpl is now PeekingIteratorImpl but deprecated. Index: RemarkNode.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/nodes/RemarkNode.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RemarkNode.java 1 Nov 2003 01:36:56 -0000 1.11 --- RemarkNode.java 8 Nov 2003 21:30:56 -0000 1.12 *************** *** 94,101 **** } - public void collectInto(NodeList collectionList, String filter) { - if (filter==REMARK_NODE_FILTER) collectionList.add(this); - } - public void accept(Object visitor) { } --- 94,97 ---- Index: StringNode.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/nodes/StringNode.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** StringNode.java 1 Nov 2003 01:36:56 -0000 1.12 --- StringNode.java 8 Nov 2003 21:30:56 -0000 1.13 *************** *** 103,113 **** } - - public void collectInto (NodeList collectionList, String filter) - { - if (STRING_FILTER == filter) - collectionList.add (this); - } - public void accept (Object visitor) { --- 103,106 ---- Index: TagNode.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/nodes/TagNode.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** TagNode.java 1 Nov 2003 21:55:42 -0000 1.22 --- TagNode.java 8 Nov 2003 21:30:56 -0000 1.23 *************** *** 661,675 **** /** - * This method verifies that the current tag matches the provided - * filter. The match is based on the string object and not its contents, - * so ensure that you are using static final filter strings provided - * in the tag classes. - * @see org.htmlparser.Node#collectInto(NodeList, String) - */ - public void collectInto (NodeList collectionList, String filter) - { - } - - /** * Returns table of attributes in the tag * @return Hashtable --- 661,664 ---- |