1 19 20 33 package org.htmlparser.scanners; 34 import org.htmlparser.tags.DoctypeTag; 38 import org.htmlparser.tags.Tag; 39 import org.htmlparser.tags.data.TagData; 40 import org.htmlparser.util.ParserException; 41 42 45 46 public class DoctypeScanner extends TagScanner 47 { 48 private java.lang.String language; 49 private java.lang.String type; 50 51 public DoctypeScanner() 52 { 53 super(); 54 } 55 56 public DoctypeScanner(String filter) 57 { 58 super(filter); 59 } 60 61 public String [] getID() 62 { 63 String [] ids = new String [1]; 64 ids[0] = "!DOCTYPE"; 65 return ids; 66 } 67 68 protected Tag createTag(TagData tagData, Tag tag, String url) 69 throws ParserException 70 { 71 String tagContents = tag.getText(); 72 tagContents = tagContents.substring(9, tagContents.length()); 73 tagData.setTagContents(tagContents); 74 return new DoctypeTag(tagData); 75 } 76 77 } 78 | Popular Tags |