internal static List <GasStJP> Search(string keyJP) { List <GasStJP> gasStJP = new List <GasStJP>(); string queryurl = string.Format("http://api.gogo.gs/v1.1/?apid={0}", keyJP); XmlDocument xdoc = new XmlDocument(); //Xml 문서 개체 생성 xdoc.PreserveWhitespace = true; //원본의 공백 유지 xdoc.Load(queryurl); //Xml 문서 개체에 사이트 로딩 XmlNode cnode = xdoc.SelectSingleNode("PriceInfo"); //RESULT 요소 탐색 XmlNodeList xnl = cnode.SelectNodes("Item"); //OIL 요소 목록 탐색 foreach (XmlNode xn in xnl) { gasStJP.Add(GasStJP.Parse(xn)); } return(gasStJP); }