java.lang.Object
org.htmlparser.scanners.TagScanner
org.htmlparser.scanners.CompositeTagScanner
org.htmlparser.scanners.BulletScanner
- All Implemented Interfaces:
- java.io.Serializable
- public class BulletScanner
- extends CompositeTagScanner
This scanner is created by BulletListScanner. It shares a stack to maintain
the parent-child relationship with BulletListScanner. The rules implemented
are :
[1] A <ul> can have <li> under it
[2] A <li> can have <ul> under it
[3] A <li> cannot have <li> under it
These rules are implemented easily through the shared stack.
| Methods inherited from class org.htmlparser.scanners.TagScanner |
absorb, absorbLeadingBlanks, adjustScanners, createScannedNode, createTag, evaluate, 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_STRING
private static final java.lang.String[] MATCH_STRING
ENDERS
private static final java.lang.String[] ENDERS
END_TAG_ENDERS
private static final java.lang.String[] END_TAG_ENDERS
ulli
private java.util.Stack ulli
BulletScanner
public BulletScanner(java.util.Stack ulli)
BulletScanner
public BulletScanner(java.lang.String filter,
java.util.Stack ulli)
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
getID
public java.lang.String[] getID()
- Specified by:
getID in class TagScanner
shouldCreateEndTagAndExit
public boolean shouldCreateEndTagAndExit()
- This is the logic that decides when a bullet tag can be allowed
- Overrides:
shouldCreateEndTagAndExit in class CompositeTagScanner
beforeScanningStarts
public void beforeScanningStarts()
- Description copied from class:
CompositeTagScanner
- Override this method if you wish to create any data structures or do
anything before the start of the scan. This is just after a tag has
triggered the scanner but before the scanner begins its processing.
- Overrides:
beforeScanningStarts in class CompositeTagScanner