java.lang.Object
org.htmlparser.scanners.TagScanner
org.htmlparser.scanners.CompositeTagScanner
org.htmlparser.scanners.FormScanner
- All Implemented Interfaces:
- java.io.Serializable
- public class FormScanner
- extends CompositeTagScanner
Scans for the Image Tag. This is a subclass of TagScanner, and is called
using a variant of the template method. If the evaluate() method returns
true, that means the given string contains an image tag. Extraction is done
by the scan method thereafter by the user of this class.
| Methods inherited from class org.htmlparser.scanners.TagScanner |
absorb, absorbLeadingBlanks, adjustScanners, createScannedNode, createTag, extractXMLData, getFilter, getInsertedEndTag, getReplacedEndTag, insertEndTagBeforeNode, isXMLTagFound, removeChars, replaceFaultyTagWithEndTag, restoreScanners, setFeedback |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MATCH_ID
private static final java.lang.String[] MATCH_ID
PREVIOUS_DIRTY_LINK_MESSAGE
public static final java.lang.String PREVIOUS_DIRTY_LINK_MESSAGE
- See Also:
- Constant Field Values
linkScannerAlreadyOpen
private boolean linkScannerAlreadyOpen
formTagEnders
private static final java.lang.String[] formTagEnders
FormScanner
public FormScanner(org.htmlparser.Parser parser)
- HTMLFormScanner constructor comment.
FormScanner
public FormScanner(java.lang.String filter,
org.htmlparser.Parser parser)
- Overriding the constructor to accept the filter
extractFormLocn
public java.lang.String extractFormLocn(org.htmlparser.tags.Tag tag,
java.lang.String url)
throws org.htmlparser.util.ParserException
- Extract the location of the image, given the string to be parsed, and the
url of the html page in which this tag exists.
extractFormName
public java.lang.String extractFormName(org.htmlparser.tags.Tag tag)
extractFormMethod
public java.lang.String extractFormMethod(org.htmlparser.tags.Tag tag)
getID
public java.lang.String[] getID()
- Specified by:
getID in class TagScanner
evaluate
public boolean evaluate(java.lang.String s,
TagScanner previousOpenScanner)
- Description copied from class:
TagScanner
- This method is used to decide if this scanner can handle this tag type.
If the evaluation returns true, the calling side makes a call to scan().
This method has to be implemented meaningfully only if a
first-word match with the scanner id does not imply a match (or extra
processing needs to be done). Default returns true
- Overrides:
evaluate in class TagScanner
createTag
public org.htmlparser.tags.Tag createTag(org.htmlparser.tags.data.TagData tagData,
org.htmlparser.tags.data.CompositeTagData compositeTagData)
throws org.htmlparser.util.ParserException
- Description copied from class:
CompositeTagScanner
- You must override this method to create the tag of your choice upon
successful parsing. Data required for construction of your tag can be
found within tagData and compositeTagData
- Specified by:
createTag in class CompositeTagScanner