雷林鹏分享:现实生活中的 XML

  现实生活中的 XML

  如何使用 XML 来交换信息的一些实例。

  实例:XML 新闻

  XMLNews 是用于交换新闻和其他信息的规范。

  对新闻的供求双方来说,通过使用这种标准,可以使各种类型的新闻信息通过不同软硬件以及编程语言进行的制作、接收和存档更加容易:

  

  

  

  

  

  

  

  143 Dead in Colombia Earthquake

  

  

  By Jared Kotler, Associated Press Writer

  

  

  Bogota, Colombia

  Monday January 25 1999 7:28 ET

  

  

  

  实例:XML 气象服务

  XML 国家气象服务案例,来自 NOAA(National Oceanic and Atmospheric Administration):

  

  <current_observation>

  NOAA's National Weather Service

  <credit_url>http://weather.gov/

  

  http://weather.gov/images/xml_logo.gif

  

  http://weather.gov

  

  New York/John F. Kennedy Intl Airport, NY

  <station_id>KJFK

  40.66

  -73.78

  <observation_time_rfc822>Mon, 11 Feb 2008 06:51:00 -0500 EST

  

  A Few Clouds

  <temp_f>11

  <temp_c>-12

  <relative_humidity>36

  <wind_dir>West

  <wind_degrees>280

  <wind_mph>18.4

  <wind_gust_mph>29

  <pressure_mb>1023.6

  <pressure_in>30.23

  <dewpoint_f>-11

  <dewpoint_c>-24

  <windchill_f>-7

  <windchill_c>-22

  <visibility_mi>10.00

  <icon_url_base>http://weather.gov/weather/images/fcicons/

  <icon_url_name>nfew.jpg

  <disclaimer_url>http://weather.gov/disclaimer.html

  <copyright_url>http://weather.gov/disclaimer.html

  

  本文转载自:w3cschool(编辑:雷林鹏 来源:网络)

posted @ 2019-03-13 10:26  雷林鹏  阅读(154)  评论(0编辑  收藏  举报