1 19 20 33 package org.htmlparser.scanners; 34 35 import java.util.Hashtable ; 36 37 import org.htmlparser.tags.MetaTag; 38 import org.htmlparser.tags.Tag; 39 import org.htmlparser.tags.data.TagData; 40 import org.htmlparser.util.ParserException; 41 42 public class MetaTagScanner extends TagScanner 43 { 44 public MetaTagScanner(String filter) 45 { 46 super(filter); 47 } 48 49 public String [] getID() 50 { 51 String [] ids = new String [1]; 52 ids[0] = "META"; 53 return ids; 54 } 55 56 protected Tag createTag(TagData tagData, Tag tag, String url) 57 throws ParserException 58 { 59 Hashtable table = tag.getAttributes(); 60 String metaTagName = (String ) table.get("NAME"); 61 String metaTagContents = (String ) table.get("CONTENT"); 62 String httpEquiv = (String ) table.get("HTTP-EQUIV"); 63 64 return new MetaTag(tagData, httpEquiv, metaTagName, metaTagContents); 65 } 66 67 } 68 | Popular Tags |