xmlparserrelatedsuggestionresults.java

来自「yahoo api,包括各版本的」· Java 代码 · 共 29 行

JAVA
29
字号
package com.yahoo.search.xmlparser;import com.yahoo.search.RelatedSuggestionResults;import com.yahoo.xml.XmlParser;import java.util.Map;import java.util.List;public class XmlParserRelatedSuggestionResults implements RelatedSuggestionResults {    private String suggestions[];    public XmlParserRelatedSuggestionResults(Map root) {        List suggestionList = XmlParser.getList(root, "/ResultSet/Result");        if (suggestionList != null) {            suggestions = new String[suggestionList.size()];            for (int i = 0; i < suggestions.length; i++) {                suggestions[i] = XmlParser.getString((Map) suggestionList.get(i), "/value");            }        }        else {            suggestions = new String[0];        }    }    public String[] getSuggestions() {        return suggestions;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?