1 19 20 33 package org.htmlparser.scanners; 34 35 import java.util.Stack ; 36 37 import org.htmlparser.Parser; 38 import org.htmlparser.tags.BulletList; 39 import org.htmlparser.tags.Tag; 40 import org.htmlparser.tags.data.CompositeTagData; 41 import org.htmlparser.tags.data.TagData; 42 import org.htmlparser.util.ParserException; 43 44 public class BulletListScanner extends CompositeTagScanner 45 { 46 private static final String [] MATCH_STRING = { "UL" }; 47 private final static String ENDERS[] = { "BODY", "HTML" }; 48 private Stack ulli = new Stack (); 49 50 public BulletListScanner(Parser parser) 51 { 52 this("", parser); 53 } 54 55 public BulletListScanner(String filter, Parser parser) 56 { 57 super(filter, MATCH_STRING, ENDERS); 58 parser.addScanner(new BulletScanner("-bullet", ulli)); 59 } 60 61 public Tag createTag(TagData tagData, CompositeTagData compositeTagData) 62 throws ParserException 63 { 64 return new BulletList(tagData, compositeTagData); 65 } 66 67 public String [] getID() 68 { 69 return MATCH_STRING; 70 } 71 72 public void beforeScanningStarts() 73 { 74 ulli.push(this); 75 } 76 77 } 78 | Popular Tags |