2013년 3월 4일 월요일

위키페디아로 검색한 내용은 목차형식으로 잘 정리되어 있습니다. 그 중에서 원하는 목차(항목)만을 출력하려는 경우에 아래의 내용을 참고하세요.


 

출력해야하는 값

action은 query로 해야할 것 같음.

http://en.wikipedia.org/w/api.php?action=mobileview&page=Manchester_City&sections=4&prop=text

 

위의 url 의 끝에 format=json&callback=?을 첨가하여 xml 값을 가져온다.

 

http://en.wikipedia.org/w/api.php?action=mobileview&page=Manchester_City&sections=4&prop=text&format=json&callback=?

 

http://www.bauer-power.net/2010/09/use-jquery-to-add-wikipedia-content-to.html#.URKjhYKwdxA

 

 

{"mobileview":{"redirected":"Manchester City F.C.","sections":[{"id":4,"text":"<h3><span class=\"mw-headline\" id=\"First_team_squad\">First team squad<\/span><\/h3>\n<div class=\"rellink boilerplate seealso\">See also: <a href=\"\/wiki\/Manchester_City_F.C._Reserves_and_Academy\" title=\"Manchester City F.C. Reserves and Academy\">Manchester City F.C. Reserves and Academy<\/a>&#160;and <a href=\"\/wiki\/2012%E2%80%9313_Manchester_City_F.C._season\" title=\"2012\u201313 Manchester City F.C. season\">2012\u201313 Manchester City F.C. season<\/a><\/div>\n<p><small>Note: Flags indicate national team as has been defined under <a href=\"\/wiki\/FIFA_eligibility_rules\" title=\"FIFA eligibility rules\">FIFA eligibility rules<\/a>. Players may hold more than one non-FIFA nationality.<\/small><\/p>\n<table border=\"0\">\n<tr>\n<td bgcolor=\"#FFFFFF\" valign=\"top\" width=\"48%\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n<tr bgcolor=\"#AAD0FF\">\n<th width=\"1%\">No.<\/th>\n<th width=\"1%\"><\/th>\n<th width=\"1%\">Position<\/th>\n<th width=\"75%\">Player<\/th>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">1<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Goalkeeper_(association_football)\" title=\"Goalkeeper (association football)\">GK<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Joe_Hart\" title=\"Joe Hart\">Joe Hart<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">2<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Micah_Richards\" title=\"Micah Richards\">Micah Richards<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">3<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Brazil\" title=\"Brazil\"><img alt=\"Brazil\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/0\/05\/Flag_of_Brazil.svg\/22px-Flag_of_Brazil.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/0\/05\/Flag_of_Brazil.svg\/33px-Flag_of_Brazil.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/0\/05\/Flag_of_Brazil.svg\/44px-Flag_of_Brazil.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Maicon_(footballer_born_1981)\" title=\"Maicon (footballer born 1981)\">Maicon<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">4<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Belgium\" title=\"Belgium\"><img alt=\"Belgium\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/92\/Flag_of_Belgium_%28civil%29.svg\/22px-Flag_of_Belgium_%28civil%29.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/92\/Flag_of_Belgium_%28civil%29.svg\/33px-Flag_of_Belgium_%28civil%29.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/92\/Flag_of_Belgium_%28civil%29.svg\/44px-Flag_of_Belgium_%28civil%29.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Vincent_Kompany\" title=\"Vincent Kompany\">Vincent Kompany<\/a><\/span> <i>(<a href=\"\/wiki\/Captain_(association_football)\" title=\"Captain (association football)\">captain<\/a>)<\/i><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">5<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Argentina\" title=\"Argentina\"><img alt=\"Argentina\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/22px-Flag_of_Argentina.svg.png\" width=\"22\" height=\"14\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/33px-Flag_of_Argentina.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/44px-Flag_of_Argentina.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Pablo_Zabaleta\" title=\"Pablo Zabaleta\">Pablo Zabaleta<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">6<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Joleon_Lescott\" title=\"Joleon Lescott\">Joleon Lescott<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">7<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/James_Milner\" title=\"James Milner\">James Milner<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">8<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/France\" title=\"France\"><img alt=\"France\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/c\/c3\/Flag_of_France.svg\/22px-Flag_of_France.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/c\/c3\/Flag_of_France.svg\/33px-Flag_of_France.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/c\/c3\/Flag_of_France.svg\/44px-Flag_of_France.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Samir_Nasri\" title=\"Samir Nasri\">Samir Nasri<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">10<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Bosnia_and_Herzegovina\" title=\"Bosnia and Herzegovina\"><img alt=\"Bosnia and Herzegovina\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/b\/bf\/Flag_of_Bosnia_and_Herzegovina.svg\/22px-Flag_of_Bosnia_and_Herzegovina.svg.png\" width=\"22\" height=\"11\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/b\/bf\/Flag_of_Bosnia_and_Herzegovina.svg\/33px-Flag_of_Bosnia_and_Herzegovina.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/b\/bf\/Flag_of_Bosnia_and_Herzegovina.svg\/44px-Flag_of_Bosnia_and_Herzegovina.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Forward_(association_football)\" title=\"Forward (association football)\">FW<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Edin_D%C5%BEeko\" title=\"Edin D\u017eeko\">Edin D\u017eeko<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">11<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Scott_Sinclair\" title=\"Scott Sinclair\">Scott Sinclair<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">13<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Serbia\" title=\"Serbia\"><img alt=\"Serbia\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/ff\/Flag_of_Serbia.svg\/22px-Flag_of_Serbia.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/ff\/Flag_of_Serbia.svg\/33px-Flag_of_Serbia.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/ff\/Flag_of_Serbia.svg\/44px-Flag_of_Serbia.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Aleksandar_Kolarov\" title=\"Aleksandar Kolarov\">Aleksandar Kolarov<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">14<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Spain\" title=\"Spain\"><img alt=\"Spain\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/9\/9a\/Flag_of_Spain.svg\/22px-Flag_of_Spain.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/9\/9a\/Flag_of_Spain.svg\/33px-Flag_of_Spain.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/9\/9a\/Flag_of_Spain.svg\/44px-Flag_of_Spain.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Javi_Garc%C3%ADa\" title=\"Javi Garc\u00eda\">Javi Garc\u00eda<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">16<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Argentina\" title=\"Argentina\"><img alt=\"Argentina\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/22px-Flag_of_Argentina.svg.png\" width=\"22\" height=\"14\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/33px-Flag_of_Argentina.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/44px-Flag_of_Argentina.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Forward_(association_football)\" title=\"Forward (association football)\">FW<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Sergio_Ag%C3%BCero\" title=\"Sergio Ag\u00fcero\">Sergio Ag\u00fcero<\/a><\/span><\/td>\n<\/tr>\n<\/table>\n<\/td>\n<td width=\"1%\"><\/td>\n<td bgcolor=\"#FFFFFF\" valign=\"top\" width=\"48%\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n<tr bgcolor=\"#AAD0FF\">\n<th width=\"1%\">No.<\/th>\n<th width=\"1%\"><\/th>\n<th width=\"1%\">Position<\/th>\n<th width=\"75%\">Player<\/th>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">17<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Jack_Rodwell\" title=\"Jack Rodwell\">Jack Rodwell<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">18<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Gareth_Barry\" title=\"Gareth Barry\">Gareth Barry<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">21<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Spain\" title=\"Spain\"><img alt=\"Spain\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/9\/9a\/Flag_of_Spain.svg\/22px-Flag_of_Spain.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/9\/9a\/Flag_of_Spain.svg\/33px-Flag_of_Spain.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/9\/9a\/Flag_of_Spain.svg\/44px-Flag_of_Spain.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/David_Silva\" title=\"David Silva\">David Silva<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">22<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/France\" title=\"France\"><img alt=\"France\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/c\/c3\/Flag_of_France.svg\/22px-Flag_of_France.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/c\/c3\/Flag_of_France.svg\/33px-Flag_of_France.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/c\/c3\/Flag_of_France.svg\/44px-Flag_of_France.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Ga%C3%ABl_Clichy\" title=\"Ga\u00ebl Clichy\">Ga\u00ebl Clichy<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">28<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Ivory_Coast\" title=\"Ivory Coast\"><img alt=\"Ivory Coast\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/22px-Flag_of_Cote_d%27Ivoire.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/33px-Flag_of_Cote_d%27Ivoire.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/44px-Flag_of_Cote_d%27Ivoire.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Kolo_Tour%C3%A9\" title=\"Kolo Tour\u00e9\">Kolo Tour\u00e9<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">29<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/England\" title=\"England\"><img alt=\"England\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/22px-Flag_of_England.svg.png\" width=\"22\" height=\"13\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/33px-Flag_of_England.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/b\/be\/Flag_of_England.svg\/44px-Flag_of_England.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Goalkeeper_(association_football)\" title=\"Goalkeeper (association football)\">GK<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Richard_Wright_(footballer)\" title=\"Richard Wright (footballer)\">Richard Wright<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">30<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Romania\" title=\"Romania\"><img alt=\"Romania\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/7\/73\/Flag_of_Romania.svg\/22px-Flag_of_Romania.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/7\/73\/Flag_of_Romania.svg\/33px-Flag_of_Romania.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/7\/73\/Flag_of_Romania.svg\/44px-Flag_of_Romania.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Goalkeeper_(association_football)\" title=\"Goalkeeper (association football)\">GK<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Costel_Pantilimon\" title=\"Costel Pantilimon\">Costel Pantilimon<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">32<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Argentina\" title=\"Argentina\"><img alt=\"Argentina\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/22px-Flag_of_Argentina.svg.png\" width=\"22\" height=\"14\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/33px-Flag_of_Argentina.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1a\/Flag_of_Argentina.svg\/44px-Flag_of_Argentina.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Forward_(association_football)\" title=\"Forward (association football)\">FW<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Carlos_T%C3%A9vez\" title=\"Carlos T\u00e9vez\">Carlos T\u00e9vez<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">33<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Serbia\" title=\"Serbia\"><img alt=\"Serbia\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/ff\/Flag_of_Serbia.svg\/22px-Flag_of_Serbia.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/ff\/Flag_of_Serbia.svg\/33px-Flag_of_Serbia.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/ff\/Flag_of_Serbia.svg\/44px-Flag_of_Serbia.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Defender_(association_football)\" title=\"Defender (association football)\">DF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Matija_Nastasi%C4%87\" title=\"Matija Nastasi\u0107\">Matija Nastasi\u0107<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">42<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Ivory_Coast\" title=\"Ivory Coast\"><img alt=\"Ivory Coast\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/22px-Flag_of_Cote_d%27Ivoire.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/33px-Flag_of_Cote_d%27Ivoire.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/44px-Flag_of_Cote_d%27Ivoire.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Yaya_Tour%C3%A9\" title=\"Yaya Tour\u00e9\">Yaya Tour\u00e9<\/a><\/span> <i>(<a href=\"\/wiki\/Captain_(association_football)\" title=\"Captain (association football)\">vice-captain<\/a>)<\/i><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">60<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Sweden\" title=\"Sweden\"><img alt=\"Sweden\" src=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/4\/4c\/Flag_of_Sweden.svg\/22px-Flag_of_Sweden.svg.png\" width=\"22\" height=\"14\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/4\/4c\/Flag_of_Sweden.svg\/33px-Flag_of_Sweden.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/en\/thumb\/4\/4c\/Flag_of_Sweden.svg\/44px-Flag_of_Sweden.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Forward_(association_football)\" title=\"Forward (association football)\">FW<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/John_Guidetti\" title=\"John Guidetti\">John Guidetti<\/a><\/span><\/td>\n<\/tr>\n<tr class=\"vcard agent\">\n<td style=\"text-align: right;\">62<\/td>\n<td style=\"text-align: right;\"><span class=\"flagicon\"><a href=\"\/wiki\/Ivory_Coast\" title=\"Ivory Coast\"><img alt=\"Ivory Coast\" src=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/22px-Flag_of_Cote_d%27Ivoire.svg.png\" width=\"22\" height=\"15\" class=\"thumbborder\" srcset=\"\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/33px-Flag_of_Cote_d%27Ivoire.svg.png 1.5x, \/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/86\/Flag_of_Cote_d%27Ivoire.svg\/44px-Flag_of_Cote_d%27Ivoire.svg.png 2x\" \/><\/a><\/span><\/td>\n<td style=\"text-align: center;\"><a href=\"\/wiki\/Midfielder\" title=\"Midfielder\">MF<\/a><\/td>\n<td><span class=\"fn\"><a href=\"\/wiki\/Abdul_Razak_(footballer)\" title=\"Abdul Razak (footballer)\">Abdul Razak<\/a><\/span><\/td>\n<\/tr>\n<\/table>\n<\/td>\n<\/tr>\n<\/table>\n\n"}]}}

 

 

* 완성된 코드

<!DOCTYPE html>
<html>
<head>

  <script src="http://code.jquery.com/jquery-latest.js"></script>

  <style>
img.thumbborder {border: 1px solid rgb(221, 221, 221);border: medium none;vertical-align: middle;}
span.flagicon a {text-decoration: none;color: rgb(6, 69, 173);background: none repeat scroll 0% 0% transparent;}
div#wikiinfo table {font-size: 12px;}
  </style>

   <script>

        function getPlayerInfo(page, sections){

               var urls = 'http://en.wikipedia.org/w/api.php?action=mobileview&page='+page+'&sections='+sections+'&prop=text&format=json&callback=?';

               $.getJSON(urls, function(json) {
               $('#wikiInfo').html(json.mobileview.sections[0].text); 
               $("#wikiInfo").find("a:not(.references a)").attr("href", function(){ return "http://www.wikipedia.org" + $(this).attr("href");}); 
               $("#wikiInfo").find("a").attr("target", "_blank"); 
               });

       }
</script>

</head>

<body>
     <div id="wikiInfo"><script>getPlayerInfo('Manchester_City','4');</script>&nbsp;</div>
</body>

</html>


 

URL : http://en.wikipedia.org/wiki/Manchester_City#First team squad 

wiki.png

action=mobileview

*page=Manchester_City : 해당 글의 URL에 표시된 보라색 부분 

*sections=4 : 이 부분은 해당 글의 항목을 세부적으로 나누었을 때, 4번째에 해당하는 항목을 가져온다는 뜻이다.

 

아래는 위 코드의 결과값임.

 



0 개의 댓글:

댓글 쓰기

Labels

.NET Framework (1) .unselectable (1) 강좌 (32) 개인기 (1) 게시판 (1) 게임가드 (1) 경기장 (1) 경남FC (2) 공지 (1) 구글 번역 (1) 국기 (1) 그물 (1) 급여 (2) 기본급여 (1) 기타 패치 (5) 김범준 (1) 꼼수 (1) 꽁수 (1) 날씨 (1) 내문서 (1) 네덜란드어 (1) 네이버폰 (1) 노백업 (2) 노하우 (1) 농구 골대 (1) (1) 뉴스 (1) 다국어 (13) 닷넷프레임워크 (2) 대한민국 (1) 독일 (1) 독일어 (1) 돌림판 (1) 동그라미 (2) 동영상 (5) 동영상 강좌 (1) 땅볼 크로스 (1) 라이브 (1) 라인 (1) 라인 마법사 (1) 라인타기 (1) 러시아 (1) 레이아웃 (1) 로딩 동영상 (1) 로스터 (1) 로스터 업데이트 (1) 마르세유 (1) 마이팸 (1) 메뉴얼 (1) 모니터 (1) 모델링 (3) 무늬 (3) 무설치 (1) 미녀들의 수다 (1) 미수다 (1) 미식축구 (1) 민무늬 (1) 박보영 (1) 방구하기 (1) 방송 (1) 방송도우미 (1) 배경이미지 (1) 번역 (1) 베트남 (2) 변환 (1) 보증금 (1) 복구 (1) 복불복 (1) 복원 (2) 브라질 (1) 비매너 (1) 비주얼베이직 (1) 사용법 (1) 사운드카드 (1) 사포 (1) 서울 상암 (1) 석고현상 (1) 선수이름 (2) 선택 금지 (1) 설문 (1) 설정 (1) 소스 (1) 손상된 파일 (2) 스시 (1) 스카이디지탈 (1) 스코어보드 템플릿 마법사 (1) 스쿼드 (4) 스쿼드 마법사 (4) 스쿼드 메이커 (1) 스키마 (1) 스페인 (1) 시간 (1) 시뮬레이션 (4) 아로나 (1) 아리아 (1) 아프리카 TV 멀티 재생기 (1) 악성코드 (1) 안전 브라우징 (1) 앙주 (1) 앙케이트 (1) 액자효과 (2) 어경준 (1) 여론 (1) 영국 (1) 영어 (1) 오류 (3) 외국어 (3) 워크래프트3 (1) (2) 원본 (1) 월드컵 (1) 위닝카오스 (1) 위젯 (1) 유머 (1) 유투브 (2) 유학정보 (1) 이벤트 (1) 이재성 (1) 이탈리아 (2) 인터넷 방송 (2) 인터넷 속도 (1) 일본 (2) 일본어 (4) 일본여행 (1) 일식 (1) 임종은 (1) 자블라니 (1) 잔디 (14) 잔디 구역별 이미지 (1) 잔디 라인 (2) 잔디 무늬 (1) 잔디 엠블럼 (7) 잔디 패턴 (7) 장갑 (2) 재계약 (2) 재생기 (1) 재설치 (1) 재일교포 (1) 적용 (1) 정렬 (1) 정지개인기 (1) 정치 (1) 제작도구 (1) 좌익 (1) 좌파 (1) 중국 (1) 중국어 (2) 진보 (1) 집구하기 (1) 창모드 (1) 채팅 (2) 체코 (1) 추가기능 (1) 추출 (1) 축구화 뷰어 (1) 캡쳐 보드 (1) 코덱 (1) 쿄토 (1) 퀘스트 (2) 크로스 (1) 키보드 변경 프로그램 (1) 템플릿 (1) 트위터 (1) 팀고유번호 (1) 파일 관리 (1) 파일 복사기 (1) 포토샵 (1) 프랑스 (1) 프리스타일 풋볼 (4) 프리스타일2 (1) 피파온라인2 (1) 피파온라인2 패치 강좌 (36) 하숙 (1) 한국우승 (1) 한일 공동승차권 (1) 핫키 (1) 해상도 (1) 홈스테이 (1) 홈페이지 제작 (2) 화살표 (1) 히든 (1) Ad board (광고판) (12) Add On Programs (9) Afreeca TV (10) Andrey Sergeyevich Arshavin (1) ARIA (1) Arona (1) Autumn (1) Bach (1) background (1) Ball-축구공 (9) Beta (1) bigGUI (5) Blogger Tips (7) Blue (1) BlueCgi (1) bnk (1) bone (1) Bug (3) BWV 170 (1) chatting (2) chinese (1) CJ (1) cmn (1) coincidence (1) Commentary-해설 (23) confidence (1) converter (1) css (2) Damaged Clear Day (1) dat_kor (1) dbmaster (1) Depack Wizard (1) DotNet (1) DTS (1) dut (1) dutch (1) ebo (1) Emblem (잔디 엠블럼) (13) Emily Rockarts (1) error (1) etc (39) Faceon-페이스온 (9) Fate (1) ff2client (2) FIFA Manager 1.0 (11) FIFA Manager 2.0 (9) FIFA Manager 3 (28) FIFA Manager 사용법 (12) FIFA Online 2 (115) FIFA Online2 Patch Tip (21) FIFA_Manager (70) fifa.db (2) fifafs for windows GUI (1) FIFAOnline2 Patches (76) File Copier-파일 복사기 (2) flat (1) Font (1) Freestyle2 (2) fsh (4) fshtool (2) gameguard (1) Glory (1) Glove (골키퍼 장갑) (6) goal (1) Goalpost(골대) (2) Google Translation (1) Grass Pitch-잔디 (22) HDMI (1) hello kitty (5) History (18) hotkey (1) Image Converter (1) Indicator-선수 표시 (5) inevitability (1) JABULANI (1) javascript (1) keyboard (1) Keyboard Converter (1) Keyboard Reg Editor (1) Kit-유니폼 (8) KMPlayer (1) launchern.exe (1) Layout (2) Loading Image Wizard (2) Loading Image Wizard-로딩이미지 생성기 (4) Loading Image-로딩 이미지 (6) Loading Movie (로딩 동영상) (1) locale.ini (1) logo (4) LOL(리그 오브 레전드) (1) loser (1) LP (4) Lyrics (1) m200 (2) m222 (3) m228 (1) m316 (3) M43 (2) M44 (2) MAC address (1) Manual-사용법 (2) matchball (1) MAYA EX5 (1) mini flag (1) MonkeyDragon (1) motion (1) movie (2) Mow (3) MowPattern (잔디 패턴) (7) MPEG1 (1) MSN (2) MyFam (2) Net (골대 그물) (2) Nike (1) Oedit (8) OnAir (1) Other Programs (8) oval (2) part011 (2) part013 (2) passthrough (1) patch (4) pattern (1) PIP.exe (1) pitch (1) Player (1) player name (2) players_kor.big (1) Portable (2) pro (1) Programs (6) Qaa (1) Radar-레이더 (1) Random (1) RealClick (1) Registry (1) ROBO WRES - 로보트 레슬링 (1) Scoreboard Template Wizard (1) Scoreboard-스코어보드 (14) search (2) Shoes Viewer (1) Shoes-축구화 (4) simulation (2) SKYHD CaptureX HDMI (1) sound master (1) South Africa (1) SPDIF (1) Squard (2) Squard Wizard (4) Squard Wizard-재계약비 산출 (6) summer (1) t22 (1) t223 (2) t229 (6) t231 (7) t234 (2) t99 (3) Talkon (1) teamid (1) TeamViewer (1) template (1) terra (1) to23 (2) to23_s (1) to23_s.fsh (2) to25 (2) TopMost (1) total 90 (1) Travel (2) TSS-10 (1) twitter (1) ultraedit (1) Vergnügte Ruh (1) Viet Nam (2) Vietnam (2) Visual Basic (1) viv editor (1) Warcraft III (1) Widget (1) window mode (1) Windows8 (1) WinningChaos (1) Wizard (2) World Cup (1) xe (2) Yellow (1) youtube (3) zdata (9) zdata_04 (1) zdata_19 (2) zdata_19.big (2)