1 27 package org.htmlparser.tags; 28 29 32 public class OptionTag extends CompositeTag 33 { 34 37 private static final String [] mIds = new String [] {"OPTION"}; 38 39 42 private static final String [] mEnders = new String [] {"INPUT", "TEXTAREA", "SELECT", "OPTION"}; 43 44 47 private static final String [] mEndTagEnders = new String [] {"SELECT", "FORM", "BODY", "HTML"}; 48 49 52 public OptionTag () 53 { 54 } 55 56 60 public String [] getIds () 61 { 62 return (mIds); 63 } 64 65 69 public String [] getEnders () 70 { 71 return (mEnders); 72 } 73 74 78 public String [] getEndTagEnders () 79 { 80 return (mEndTagEnders); 81 } 82 83 86 public String getValue() 87 { 88 return (getAttribute("VALUE")); 89 } 90 91 94 public void setValue(String value) 95 { 96 this.setAttribute("VALUE",value); 97 } 98 99 102 public String getOptionText() 103 { 104 return toPlainTextString(); 105 } 106 107 public String toString() 108 { 109 String output = "OPTION VALUE: " + getValue() + " TEXT: " + getOptionText()+"\n"; 110 return output; 111 } 112 113 } 114 | Popular Tags |