1 16 package com.blandware.atleap.common.parsers.html; 17 18 import java.io.Reader ; 19 import java.io.IOException ; 20 import java.util.List ; 21 import java.util.ArrayList ; 22 import java.util.HashMap ; 23 24 25 33 class RefsParser extends HTMLParser { 34 protected List refList; 35 36 41 public RefsParser(Reader reader) { 42 super(reader, null, false, null); 43 refList = new ArrayList (); 44 } 45 46 protected void addText(String text) throws IOException {} 47 48 protected void addSpace() throws IOException {} 49 50 57 protected void considerText(String text) throws IOException { 58 refList.add(text); 59 } 60 61 66 protected void considerSpace() throws IOException {} 67 68 protected void processTag(String tagName, HashMap attributes, 69 boolean closing) throws IOException { 70 checkoutAttribute(attributes, "src"); 71 checkoutAttribute(attributes, "href"); 72 checkoutAttribute(attributes, "background"); 73 } 74 75 public List getExtractedRefs() { 76 return refList; 77 } 78 } 79 | Popular Tags |