[Htmlparser-cvs] htmlparser/src/org/htmlparser/tags AppletTag.java,1.26,1.27 BaseHrefTag.java,1.24,1
Brought to you by:
derrickoswald
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags In directory sc8-pr-cvs1:/tmp/cvs-serv24483/src/org/htmlparser/tags Modified Files: AppletTag.java BaseHrefTag.java BodyTag.java Bullet.java BulletList.java CompositeTag.java Div.java DoctypeTag.java EndTag.java FormTag.java FrameSetTag.java FrameTag.java HeadTag.java Html.java ImageTag.java InputTag.java JspTag.java LabelTag.java LinkTag.java MetaTag.java OptionTag.java ScriptTag.java SelectTag.java Span.java StyleTag.java TableColumn.java TableRow.java TableTag.java Tag.java TextareaTag.java TitleTag.java package.html Log Message: Add style checking target to ant build script: ant checkstyle It uses a jar from http://checkstyle.sourceforge.net which is dropped in the lib directory. The rules are in the file htmlparser_checks.xml in the src directory. Added lexerapplications package with Tabby as the first app. It performs whitespace manipulation on source files to follow the style rules. This reduced the number of style violations to roughly 14,000. There are a few issues with the style checker that need to be resolved before it should be taken too seriously. For example: It thinks all method arguments should be final, even if they are modified by the code (which the compiler frowns on). It complains about long lines, even when there is no possibility of wrapping the line, i.e. a URL in a comment that's more than 80 characters long. It considers all naked integers as 'magic numbers', even when they are obvious, i.e. the 4 corners of a box. It complains about whitespace following braces, even in array initializers, i.e. X[][] = { {a, b} { } } But it points out some really interesting things, even if you don't agree with the style guidelines, so it's worth a look. Index: AppletTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/AppletTag.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** AppletTag.java 8 Sep 2003 02:26:29 -0000 1.26 --- AppletTag.java 10 Sep 2003 03:38:19 -0000 1.27 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 43,47 **** * archive and parameters. */ ! public class AppletTag extends CompositeTag { /** --- 43,47 ---- * archive and parameters. */ ! public class AppletTag extends CompositeTag { /** *************** *** 50,54 **** * @param compositeTagData The data for this composite tag. */ ! public AppletTag (TagData tagData,CompositeTagData compositeTagData) { super(tagData,compositeTagData); --- 50,54 ---- * @param compositeTagData The data for this composite tag. */ ! public AppletTag (TagData tagData,CompositeTagData compositeTagData) { super(tagData,compositeTagData); *************** *** 71,75 **** kids = getChildren (); for (int i = 0; i < kids.size (); i++) ! { node = children.elementAt(i); if (node instanceof Tag) --- 71,75 ---- kids = getChildren (); for (int i = 0; i < kids.size (); i++) ! { node = children.elementAt(i); if (node instanceof Tag) *************** *** 87,91 **** } } ! return (ret); } --- 87,91 ---- } } ! return (ret); } *************** *** 108,112 **** return (createAppletParamsTable ()); } ! /** * Get the jar file of the applet. --- 108,112 ---- return (createAppletParamsTable ()); } ! /** * Get the jar file of the applet. *************** *** 117,121 **** return (getAttribute ("ARCHIVE")); } ! /** * Get the code base of the applet. --- 117,121 ---- return (getAttribute ("ARCHIVE")); } ! /** * Get the code base of the applet. *************** *** 142,146 **** * @return An enumeration of the <code>PARAM<code> tag <code>NAME<code> attributes. */ ! public Enumeration getParameterNames () { return (getAppletParams ().keys ()); --- 142,146 ---- * @return An enumeration of the <code>PARAM<code> tag <code>NAME<code> attributes. */ ! public Enumeration getParameterNames () { return (getAppletParams ().keys ()); *************** *** 155,159 **** setAttribute ("CODE", newAppletClass); } ! /** * Set the enclosed <code>PARM<code> children. --- 155,159 ---- setAttribute ("CODE", newAppletClass); } ! /** * Set the enclosed <code>PARM<code> children. *************** *** 169,173 **** String s; TagData tagData; ! kids = getChildren (); // erase appletParams from kids --- 169,173 ---- String s; TagData tagData; ! kids = getChildren (); // erase appletParams from kids *************** *** 183,187 **** i++; } ! // add newAppletParams to kids for (Enumeration e = newAppletParams.keys (); e.hasMoreElements (); ) --- 183,187 ---- i++; } ! // add newAppletParams to kids for (Enumeration e = newAppletParams.keys (); e.hasMoreElements (); ) *************** *** 193,201 **** kids.add (new Tag (tagData)); } ! //set kids as new children setChildren (kids); } ! /** * Set the <code>ARCHIVE<code> attribute. --- 193,201 ---- kids.add (new Tag (tagData)); } ! //set kids as new children setChildren (kids); } ! /** * Set the <code>ARCHIVE<code> attribute. *************** *** 206,210 **** setAttribute ("ARCHIVE", newArchive); } ! /** * Set the <code>CODEBASE<code> attribute. --- 206,210 ---- setAttribute ("ARCHIVE", newArchive); } ! /** * Set the <code>CODEBASE<code> attribute. *************** *** 229,233 **** Node node; StringBuffer ret; ! ret = new StringBuffer(500); ret.append ("Applet Tag\n"); --- 229,233 ---- Node node; StringBuffer ret; ! ret = new StringBuffer(500); ret.append ("Applet Tag\n"); Index: BaseHrefTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/BaseHrefTag.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** BaseHrefTag.java 8 Sep 2003 02:26:29 -0000 1.24 --- BaseHrefTag.java 10 Sep 2003 03:38:20 -0000 1.25 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com Index: BodyTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/BodyTag.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** BodyTag.java 8 Sep 2003 02:26:29 -0000 1.13 --- BodyTag.java 10 Sep 2003 03:38:20 -0000 1.14 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 41,49 **** super(tagData,compositeTagData); } ! public String getBody() { return toPlainTextString(); } ! public String toString() { return "BODY: "+getBody(); --- 41,49 ---- super(tagData,compositeTagData); } ! public String getBody() { return toPlainTextString(); } ! public String toString() { return "BODY: "+getBody(); Index: Bullet.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/Bullet.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Bullet.java 8 Sep 2003 02:26:29 -0000 1.13 --- Bullet.java 10 Sep 2003 03:38:20 -0000 1.14 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com Index: BulletList.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/BulletList.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** BulletList.java 8 Sep 2003 02:26:29 -0000 1.13 --- BulletList.java 10 Sep 2003 03:38:20 -0000 1.14 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com Index: CompositeTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/CompositeTag.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** CompositeTag.java 8 Sep 2003 02:26:29 -0000 1.53 --- CompositeTag.java 10 Sep 2003 03:38:20 -0000 1.54 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 63,67 **** public Node getChild (int index) { ! return (getChildren ().elementAt (index)); } --- 63,67 ---- public Node getChild (int index) { ! return (getChildren ().elementAt (index)); } *************** *** 74,78 **** return (getChildren ().toNodeArray ()); } ! /** * Remove the child at the position given. --- 74,78 ---- return (getChildren ().toNodeArray ()); } ! /** * Remove the child at the position given. *************** *** 113,117 **** if (prevNode.elementEnd()>node.elementBegin()) { // Its a new line ! sb.append(Parser.getLineSeparator()); } } --- 113,117 ---- if (prevNode.elementEnd()>node.elementBegin()) { // Its a new line ! sb.append(Parser.getLineSeparator()); } } *************** *** 155,159 **** } } ! if (found) return tag; else --- 155,159 ---- } } ! if (found) return tag; else *************** *** 161,165 **** } ! /** * Searches for any node whose text representation contains the search * string. Collects all such nodes in a NodeList. --- 161,165 ---- } ! /** * Searches for any node whose text representation contains the search * string. Collects all such nodes in a NodeList. *************** *** 182,190 **** for (SimpleNodeIterator e = children();e.hasMoreNodes();) { node = e.nextNode(); ! String nodeTextString = node.toPlainTextString(); if (!caseSensitive) nodeTextString=nodeTextString.toUpperCase(); if (nodeTextString.indexOf(searchString)!=-1) { foundList.add(node); ! } } return foundList; --- 182,190 ---- for (SimpleNodeIterator e = children();e.hasMoreNodes();) { node = e.nextNode(); ! String nodeTextString = node.toPlainTextString(); if (!caseSensitive) nodeTextString=nodeTextString.toUpperCase(); if (nodeTextString.indexOf(searchString)!=-1) { foundList.add(node); ! } } return foundList; *************** *** 193,197 **** /** * Collect all objects that are of a certain type ! * Note that this will not check for parent types, and will not * recurse through child tags * @param classType --- 193,197 ---- /** * Collect all objects that are of a certain type ! * Note that this will not check for parent types, and will not * recurse through child tags * @param classType *************** *** 202,206 **** return (getChildren ().searchFor (classType)); } ! /** * Searches for any node whose text representation contains the search * string. Collects all such nodes in a NodeList. --- 202,206 ---- return (getChildren ().searchFor (classType)); } ! /** * Searches for any node whose text representation contains the search * string. Collects all such nodes in a NodeList. *************** *** 220,224 **** /** ! * Returns the node number of the string node containing the * given text. This can be useful to index into the composite tag * and get other children. --- 220,224 ---- /** ! * Returns the node number of the string node containing the * given text. This can be useful to index into the composite tag * and get other children. *************** *** 232,236 **** node = e.nextNode(); if (node.toPlainTextString().toUpperCase().indexOf(text.toUpperCase())!=-1) { ! return loc; } loc++; --- 232,236 ---- node = e.nextNode(); if (node.toPlainTextString().toUpperCase().indexOf(text.toUpperCase())!=-1) { ! return loc; } loc++; *************** *** 238,248 **** return -1; } ! /** * Returns the node number of a child node given the node object. ! * This would typically be used in conjuction with digUpStringNode, ! * after which the string node's parent can be used to find the ! * string node's position. Faster than calling findPositionOf(text) ! * again. Note that the position is at a linear level alone - there * is no recursion in this method. * @param searchNode The child node to find. --- 238,248 ---- return -1; } ! /** * Returns the node number of a child node given the node object. ! * This would typically be used in conjuction with digUpStringNode, ! * after which the string node's parent can be used to find the ! * string node's position. Faster than calling findPositionOf(text) ! * again. Note that the position is at a linear level alone - there * is no recursion in this method. * @param searchNode The child node to find. *************** *** 255,259 **** node = e.nextNode(); if (node==searchNode) { ! return loc; } loc++; --- 255,259 ---- node = e.nextNode(); if (node==searchNode) { ! return loc; } loc++; *************** *** 261,265 **** return -1; } ! /** * Get child at given index --- 261,265 ---- return -1; } ! /** * Get child at given index *************** *** 270,274 **** return (getChildren ().elementAt (index)); } ! public void collectInto(NodeList collectionList, String filter) { super.collectInto(collectionList, filter); --- 270,274 ---- return (getChildren ().elementAt (index)); } ! public void collectInto(NodeList collectionList, String filter) { super.collectInto(collectionList, filter); *************** *** 286,290 **** } } ! public String getChildrenHTML() { StringBuffer buff = new StringBuffer(); --- 286,290 ---- } } ! public String getChildrenHTML() { StringBuffer buff = new StringBuffer(); *************** *** 295,301 **** return buff.toString(); } ! public void accept(NodeVisitor visitor) { ! if (visitor.shouldRecurseChildren()) { startTag.accept(visitor); SimpleNodeIterator children = children(); --- 295,301 ---- return buff.toString(); } ! public void accept(NodeVisitor visitor) { ! if (visitor.shouldRecurseChildren()) { startTag.accept(visitor); SimpleNodeIterator children = children(); *************** *** 322,328 **** } ! /** * Finds a string node, however embedded it might be, and returns ! * it. The string node will retain links to its parents, so * further navigation is possible. * @param searchText --- 322,328 ---- } ! /** * Finds a string node, however embedded it might be, and returns ! * it. The string node will retain links to its parents, so * further navigation is possible. * @param searchText *************** *** 341,345 **** StringNode [] nodes = ctag.digupStringNode(searchText); for (int j=0;j<nodes.length;j++) ! stringNodes.add(nodes[j]); } } --- 341,345 ---- StringNode [] nodes = ctag.digupStringNode(searchText); for (int j=0;j<nodes.length;j++) ! stringNodes.add(nodes[j]); } } Index: Div.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/Div.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Div.java 8 Sep 2003 02:26:29 -0000 1.13 --- Div.java 10 Sep 2003 03:38:20 -0000 1.14 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com Index: DoctypeTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/DoctypeTag.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** DoctypeTag.java 8 Sep 2003 02:26:29 -0000 1.26 --- DoctypeTag.java 10 Sep 2003 03:38:20 -0000 1.27 *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@ki... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Email : so...@in... --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@ki... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Email : so...@in... Index: EndTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/EndTag.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** EndTag.java 8 Sep 2003 02:26:29 -0000 1.29 --- EndTag.java 10 Sep 2003 03:38:20 -0000 1.30 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 42,46 **** public final static int ENDTAG_BEGIN_PARSING_STATE=2; public final static int ENDTAG_FINISHED_PARSING_STATE=3; ! /** * Constructor takes 3 arguments to construct an EndTag object. --- 42,46 ---- public final static int ENDTAG_BEGIN_PARSING_STATE=2; public final static int ENDTAG_FINISHED_PARSING_STATE=3; ! /** * Constructor takes 3 arguments to construct an EndTag object. *************** *** 72,76 **** state = ENDTAG_FINISHED_PARSING_STATE; tagEnd = i; ! } if (state==ENDTAG_BEGIN_PARSING_STATE) { --- 72,76 ---- state = ENDTAG_FINISHED_PARSING_STATE; tagEnd = i; ! } if (state==ENDTAG_BEGIN_PARSING_STATE) { *************** *** 79,83 **** if (state==ENDTAG_WAIT_FOR_SLASH_STATE) { ! if (ch=='/') { state = ENDTAG_BEGIN_PARSING_STATE; --- 79,83 ---- if (state==ENDTAG_WAIT_FOR_SLASH_STATE) { ! if (ch=='/') { state = ENDTAG_BEGIN_PARSING_STATE; *************** *** 97,101 **** { state=ENDTAG_FINISHED_PARSING_STATE; ! tagEnd=i; } } --- 97,101 ---- { state=ENDTAG_FINISHED_PARSING_STATE; ! tagEnd=i; } } *************** *** 108,115 **** tagEnd=i; state=ENDTAG_FINISHED_PARSING_STATE; ! } if (state==ENDTAG_FINISHED_PARSING_STATE) return new EndTag(new TagData(tagBegin,tagEnd,tagContents.toString(),input)); ! else return null; } public String toPlainTextString() { --- 108,115 ---- tagEnd=i; state=ENDTAG_FINISHED_PARSING_STATE; ! } if (state==ENDTAG_FINISHED_PARSING_STATE) return new EndTag(new TagData(tagBegin,tagEnd,tagContents.toString(),input)); ! else return null; } public String toPlainTextString() { *************** *** 122,126 **** return "EndTag : "+tagContents+"; begins at : "+elementBegin()+"; ends at : "+elementEnd(); } ! public void accept(NodeVisitor visitor) { visitor.visitEndTag(this); --- 122,126 ---- return "EndTag : "+tagContents+"; begins at : "+elementBegin()+"; ends at : "+elementEnd(); } ! public void accept(NodeVisitor visitor) { visitor.visitEndTag(this); Index: FormTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/FormTag.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** FormTag.java 8 Sep 2003 02:26:29 -0000 1.32 --- FormTag.java 10 Sep 2003 03:38:20 -0000 1.33 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 55,59 **** protected NodeList formInputList; private NodeList textAreaList; ! /** * Constructor takes in tagData, compositeTagData, formTagData --- 55,59 ---- protected NodeList formInputList; private NodeList textAreaList; ! /** * Constructor takes in tagData, compositeTagData, formTagData *************** *** 64,68 **** { super(tagData,compositeTagData); ! this.formURL = compositeTagData.getStartTag().getAttribute("ACTION"); this.formName = compositeTagData.getStartTag().getAttribute("NAME"); --- 64,68 ---- { super(tagData,compositeTagData); ! this.formURL = compositeTagData.getStartTag().getAttribute("ACTION"); this.formName = compositeTagData.getStartTag().getAttribute("NAME"); *************** *** 71,75 **** this.textAreaList = compositeTagData.getChildren().searchFor(TextareaTag.class, true); } ! /** * Get the list of input fields. --- 71,75 ---- this.textAreaList = compositeTagData.getChildren().searchFor(TextareaTag.class, true); } ! /** * Get the list of input fields. *************** *** 80,84 **** return formInputList; } ! /** * Get the list of text areas. --- 80,84 ---- return formInputList; } ! /** * Get the list of text areas. *************** *** 89,93 **** return textAreaList; } ! /** * @return String The url of the form --- 89,93 ---- return textAreaList; } ! /** * @return String The url of the form *************** *** 97,101 **** return formURL; } ! /** * Returns the method of the form --- 97,101 ---- return formURL; } ! /** * Returns the method of the form *************** *** 104,113 **** public String getFormMethod() { if(formMethod==null) ! { formMethod = "GET"; } return formMethod; } ! /** * Get the input tag in the form corresponding to the given name --- 104,113 ---- public String getFormMethod() { if(formMethod==null) ! { formMethod = "GET"; } return formMethod; } ! /** * Get the input tag in the form corresponding to the given name *************** *** 128,132 **** return inputTag; else return null; } ! /** * @return String The name of the form --- 128,132 ---- return inputTag; else return null; } ! /** * @return String The name of the form *************** *** 135,141 **** return formName; } ! /** ! * Set the form location. Modification of this element will cause the HTML rendering * to change as well (in a call to toHTML()). * @param formURL The new FORM location --- 135,141 ---- return formName; } ! /** ! * Set the form location. Modification of this element will cause the HTML rendering * to change as well (in a call to toHTML()). * @param formURL The new FORM location *************** *** 167,175 **** } } ! if (found) return textareaTag; else return null; } ! } --- 167,175 ---- } } ! if (found) return textareaTag; else return null; } ! } Index: FrameSetTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/FrameSetTag.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** FrameSetTag.java 8 Sep 2003 02:26:29 -0000 1.24 --- FrameSetTag.java 10 Sep 2003 03:38:20 -0000 1.25 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 49,53 **** this.frames = compositeTagData.getChildren(); } ! /** * Returns the location of the frame --- 49,53 ---- this.frames = compositeTagData.getChildren(); } ! /** * Returns the location of the frame *************** *** 56,64 **** return frameURL; } ! public String getFrameName() { return frameName; } ! /** * Print the contents of the HTMLImageNode --- 56,64 ---- return frameURL; } ! public String getFrameName() { return frameName; } ! /** * Print the contents of the HTMLImageNode *************** *** 67,71 **** return "FRAME TAG : Image at "+frameURL+"; begins at : "+elementBegin()+"; ends at : "+elementEnd(); } ! /** * Returns the frames. --- 67,71 ---- return "FRAME TAG : Image at "+frameURL+"; begins at : "+elementBegin()+"; ends at : "+elementEnd(); } ! /** * Returns the frames. Index: FrameTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/FrameTag.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** FrameTag.java 8 Sep 2003 02:26:29 -0000 1.24 --- FrameTag.java 10 Sep 2003 03:38:20 -0000 1.25 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com Index: HeadTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/HeadTag.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HeadTag.java 8 Sep 2003 02:26:29 -0000 1.13 --- HeadTag.java 10 Sep 2003 03:38:20 -0000 1.14 *************** *** 1,27 **** // HTMLParser Library v1_4_20030907 - A java-based parser for HTML // Copyright (C) Dec 31, 2000 Somik Raha ! // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. ! // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! // // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 1,27 ---- // HTMLParser Library v1_4_20030907 - A java-based parser for HTML // Copyright (C) Dec 31, 2000 Somik Raha ! // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. ! // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! // // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 40,44 **** super(tagData, compositeTagData); } ! public String toString() { return "HEAD: " + super.toString(); --- 40,44 ---- super(tagData, compositeTagData); } ! public String toString() { return "HEAD: " + super.toString(); Index: Html.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/Html.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Html.java 8 Sep 2003 02:26:29 -0000 1.25 --- Html.java 10 Sep 2003 03:38:20 -0000 1.26 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 37,40 **** super(tagData, compositeTagData); } ! } --- 37,40 ---- super(tagData, compositeTagData); } ! } Index: ImageTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/ImageTag.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ImageTag.java 8 Sep 2003 02:26:29 -0000 1.25 --- ImageTag.java 10 Sep 2003 03:38:21 -0000 1.26 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 33,37 **** /** ! * Identifies an image tag */ public class ImageTag extends Tag --- 33,37 ---- /** ! * Identifies an image tag */ public class ImageTag extends Tag Index: InputTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/InputTag.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** InputTag.java 8 Sep 2003 02:26:29 -0000 1.25 --- InputTag.java 10 Sep 2003 03:38:21 -0000 1.26 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 37,41 **** super(tagData); } ! public String toString() { return (ParserUtils.toString(this)); --- 37,41 ---- super(tagData); } ! public String toString() { return (ParserUtils.toString(this)); Index: JspTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/JspTag.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** JspTag.java 8 Sep 2003 02:26:29 -0000 1.27 --- JspTag.java 10 Sep 2003 03:38:21 -0000 1.28 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 45,53 **** super(tagData); } ! public String toHtml() { return "<%"+tagContents+"%>"; } ! /** * Print the contents of the remark tag. --- 45,53 ---- super(tagData); } ! public String toHtml() { return "<%"+tagContents+"%>"; } ! /** * Print the contents of the remark tag. Index: LabelTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/LabelTag.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** LabelTag.java 8 Sep 2003 02:26:29 -0000 1.26 --- LabelTag.java 10 Sep 2003 03:38:21 -0000 1.27 *************** *** 1,27 **** // HTMLParser Library v1_4_20030907 - A java-based parser for HTML // Copyright (C) Dec 31, 2000 Somik Raha ! // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. ! // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! // // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 1,27 ---- // HTMLParser Library v1_4_20030907 - A java-based parser for HTML // Copyright (C) Dec 31, 2000 Somik Raha ! // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. ! // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! // // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 40,48 **** super(tagData, compositeTagData); } ! public String getLabel() { return toPlainTextString(); } ! public String toString() { return "LABEL: "+getLabel(); --- 40,48 ---- super(tagData, compositeTagData); } ! public String getLabel() { return toPlainTextString(); } ! public String toString() { return "LABEL: "+getLabel(); Index: LinkTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/LinkTag.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** LinkTag.java 8 Sep 2003 02:26:29 -0000 1.33 --- LinkTag.java 10 Sep 2003 03:38:21 -0000 1.34 *************** *** 11,15 **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software --- 11,15 ---- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. ! // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software *************** *** 18,27 **** // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com --- 18,27 ---- // For any questions or suggestions, you can write to me at : // Email :so...@in... ! // ! // Postal Address : // Somik Raha // Extreme Programmer & Coach // Industrial Logic Corporation ! // 2583 Cedar Street, Berkeley, // CA 94708, USA // Website : http://www.industriallogic.com *************** *** 37,41 **** import org.htmlparser.visitors.NodeVisitor; /** ! * Identifies a link tag */ public class LinkTag extends CompositeTag --- 37,41 ---- import org.htmlparser.visitors.NodeVisitor; /** ! * Identifies a link tag */ public class LinkTag extends CompositeTag *************** *** 44,48 **** /** * The URL where the link points to ! */ protected String link; /** --- 44,48 ---- /** * The URL where the link points to ! */ protected String link; /** *************** *** 57,66 **** private boolean javascriptLink; ! /** * Constructor creates an HTMLLinkNode object, which basically stores the location * where the link points to, and the text it contains. * <p> ! * In order to get the contents of the link tag, use the method linkData(), * which returns an enumeration of nodes encapsulated within the link. * <p> --- 57,66 ---- private boolean javascriptLink; ! /** * Constructor creates an HTMLLinkNode object, which basically stores the location * where the link points to, and the text it contains. * <p> ! * In order to get the contents of the link tag, use the method linkData(), * which returns an enumeration of nodes encapsulated within the link. * <p> *************** *** 78,82 **** * </pre> * There is another mechanism available that allows for uniform extraction of images. You could do this to ! * get all images from a web page : * <pre> * Node node; --- 78,82 ---- * </pre> * There is another mechanism available that allows for uniform extraction of images. You could do this to ! * get all images from a web page : * <pre> * Node node; *************** *** 94,98 **** */ public LinkTag(TagData tagData,CompositeTagData compositeTagData,LinkData linkData) { ! super(tagData,compositeTagData); this.link = linkData.getLink(); this.linkText = linkData.getLinkText(); --- 94,98 ---- */ public LinkTag(TagData tagData,CompositeTagData compositeTagData,LinkData linkData) { ! super(tagData,compositeTagData); this.link = linkData.getLink(); this.linkText = linkData.getLinkText(); *************** *** 184,188 **** /** * Tests if the link is an HTTP link or one of its variations (HTTPS, etc.). ! * * @return flag indicating if this link is an HTTP link or one of its variations (HTTPS, etc.) */ --- 184,188 ---- /** * Tests if the link is an HTTP link or one of its variations (HTTPS, etc.). ! * * @return flag indicating if this link is an HTTP link or one of its variations (HTTPS, etc.) */ *************** *** 203,207 **** /** * Set the link as a javascript link. ! * * @param newJavascriptLink flag indicating if the link is a javascript code */ --- 203,207 ---- /** * Set the link as a javascript link. ! * * @param newJavascriptLink flag indicating if the link is a javascript code */ *************** *** 219,227 **** if (accessKey==null) sb.append("null\n"); else sb.append(accessKey+"\n"); ! if (children()!=null) { sb.append(" "+"LinkData\n"); sb.append(" "+"--------\n"); ! Node node; int i = 0; --- 219,227 ---- if (accessKey==null) sb.append("null\n"); else sb.append(accessKey+"\n"); ! if (children()!=null) { sb.append(" "+"LinkData\n"); sb.append(" "+"--------\n"); ! Node node; int i = 0; *************** *** 250,254 **** return children(); } ! public void accept(NodeVisitor visitor) { visitor.visitLinkTag(this); --- 250,254 ---- return children(); } ! public void accept(NodeVisitor visitor) { visitor.visitLinkTag(this); Index: MetaTag.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/MetaTag.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** MetaTag.java 8 Sep 2003 02:26:29 -0000 1.25 --- MetaTag.java 10 Sep 2003 03:38:21 -0000 1.26 *************** *** 11,15 **** // ... [truncated message content] |