static Option[] getOptions(String doc) { Vector options = new Vector(); parser.parse(doc); while (parser.nextTag()) { String content = parser.getContent(); String attrs = parser.getAttrs(); Option option = new Option(); option.buildAttrs(attrs); option.build(content); options.addElement(option); } Option[] result = new Option[options.size()]; result = (Option[]) options.toArray(result); return result; }
protected void build(String content) { option = Option.getOptions(content); }