1 19 20 33 package org.htmlparser.scanners; 34 35 import java.util.Hashtable ; 36 37 import org.htmlparser.tags.LinkTagTag; 38 import org.htmlparser.tags.Tag; 39 import org.htmlparser.tags.data.TagData; 40 import org.htmlparser.util.ParserException; 41 42 public class LinkTagScanner extends TagScanner 43 { 44 public LinkTagScanner() 45 { 46 this(""); 47 } 48 49 public LinkTagScanner(String filter) 50 { 51 super(filter); 52 } 53 54 public String [] getID() 55 { 56 String [] ids = new String [1]; 57 ids[0] = "LINK"; 58 return ids; 59 } 60 61 protected Tag createTag(TagData tagData, Tag tag, String url) 62 throws ParserException 63 { 64 Hashtable table = tag.getAttributes(); 65 String metaTagRel = (String ) table.get("REL"); 66 String metaTagType = (String ) table.get("TYPE"); 67 String httpEquiv = (String ) table.get("HREF"); 68 69 return new LinkTagTag(tagData, httpEquiv, metaTagRel, metaTagType); 70 } 71 72 } 73 | Popular Tags |