在ios swift中处理html数据的最佳方法是什么?

时间:2018-06-15 14:28:14

标签: html swift html5 html-parsing

我正在移动博客上工作我必须解析来自服务器的html数据,并按正确的顺序分别显示数据。我收到了这个回复。

<p>Travel to the 7 wonders of the world is an impressive undertaking! Some people have waited their whole lives to cross these destinations off their dream list. So that you can start your planning your packing list accordingly, here&rsquo;s a list of the 7 wonders of the world and their locations:</p>\n\n<ol>\n\t<li><a href=\"http://www.ancient.eu/Chichen_Itza/\">Chichen Itza, Mexico</a></li>\n\t<li><a href=\"http://www.history.com/topics/great-wall-of-china\">Great Wall of China</a></li>\n\t<li><a href=\"http://www.machupicchu.org/\">Machu Picchu, Peru</a></li>\n\t<li><a href=\"https://www.britannica.com/topic/Christ-the-Redeemer\">Christ the Redeemer Statue, Rio de Janeiro</a></li>\n\t<li><a href=\"http://www.history.com/topics/ancient-history/colosseum\">Colosseum, Italy</a></li>\n\t<li><a href=\"http://whc.unesco.org/en/list/252\">Taj Mahal, India</a></li>\n\t<li><a href=\"http://www.nationalgeographic.com/archaeology-and-history/archaeology/lost-city-petra/\">Petra, Jordan</a></li>\n</ol>\n\n<h1>Chichen Itza</h1>\n\n<p class=\"image-align-center\"><img alt=\"\" height=\"498\" src=\"https://www.ancient.eu/img/r/p/750/3048.jpg?v=1485680877\" width=\"750\"></p>\n\n<p><a href=\"https://www.ancient.eu/Chichen_Itza/\">Chichen Itza</a>, located at the northern tip of the Yucat&aacute;n Peninsula of modern Mexico, was a <a href=\"https://www.ancient.eu/Maya/\">Maya</a><a href=\"https://www.ancient.eu/city/\">city</a> which was later significantly influenced by the <a href=\"https://www.ancient.eu/Toltec_Civilization/\">Toltec civilization</a>. Flourishing between c. 750 and 1200 CE, the site is rich in monumental architecture and sculpture which promote themes of militarism and displays imagery of jaguars, eagles, and feathered-serpents. Probably a capital city ruling over a confederacy of neighbouring states, Chichen Itza was one of the great Mesoamerican <a href=\"https://www.ancient.eu/cities/\">cities</a> and remains today one of the most popular tourist sites in Mexico.</p>\n\n<p>GREAT WALL OF CHINA</p>\n\n<p>The Great Wall of China is an ancient series of walls and fortifications, totaling more than 13,000 miles in length, located in northern China. Perhaps the most recognizable symbol of China and its long and vivid history, the Great Wall was originally conceived by Emperor Qin Shi Huang in the third century B.C. as a means of preventing incursions from barbarian nomads. The best-known and best-preserved section of the Great Wall was built in the 14th through 17th centuries A.D., during the Ming dynasty. Though the Great Wall never effectively prevented invaders from entering China, it came to function as a powerful symbol of Chinese civilization&rsquo;s enduring strength.</p>\n\n<p class=\"image-align-center\"><img alt=\"\" height=\"192\" src=\"https://cdn.history.com/sites/2/2016/02/GettyImages-484536724-A.jpeg\" width=\"334\"></p>\n\n<p> </p>\n

0 个答案:

没有答案