Weather Information in XML
 
 
 
 
1. The XML bulletins can be viewed using web browsers. Are they designed to be read by human beings?
The XML weather bulletins on this site are designed to be used by information systems (computers). Please consult your Information Technology divisions / sections / units on how to integrate weather information provided by this site into your systems. Information embedded in the XML weather bulletins can also be found at HKO Internet web site (http://www.weather.gov.hk/) in a human readable form.
 
2. How can I use the XML weather bulletins?
The XML weather bulletins in this web site are provided in "real-time", in the sense that they are updated as timely as they are disseminated to other channels such as the media. You can develop computer programs to poll the weather bulletins from this web site and make use of the weather information in the XML files. Some possible applications include:
  • Displaying weather information on your web site.
  • Displaying the weather situation in the information kiosk at the entrances of premises.
  • Sending out Short Messages (SMS) to staff on field upon issuance of certain weather warnings.
 
3. Why XML?
The XML has many advantages over the traditional encoded data method. Some of them include:
  • The formats are standardized so programmers spend less time on understanding them; and
  • Software packages for manipulating XML are widely available and therefore application programs need not be written from scratch.
Furthermore, the XML weather site is simple to use. Programmers who have basic understanding in XML should have already acquired the skill to write useful and effective programs to handle the data.
 
4. Can I decode the XML weather bulletins available in this site?
There are a number of free or commercial XML parsers that are capable of reading standard XML documents. Some popular ones include:
	Apache Xerces: http://xml.apache.org/#xerces
	IBM XML4J: http://alphaworks.ibm.com/tech/xml4j
	James Clark XP: http://jclark.com/xml/xp/index.html
	
A comparison of such XML parsers can be found at http://webreference.com/xml/column22/2.html.
 
5. Can the XML weather bulletins be converted into other format, for example, Hyper Text Markup Language (HTML)?
XML documents can be easily converted into any other formats by applying eXtensible Stylesheet Language (XSL) on the documents. An online tutorial on XSL can be found at https://www.w3schools.com/xml/xsl_languages.asp.
 
6. What is the use of the XML Schemas?
XML Schemas define the structure of the XML documents and can be used to validate XML documents. An online tutorial on XML Schema can be found at https://www.w3schools.com/xml/schema_intro.asp.
 
7. What is a "Mixed" bulletin?
In a "Mixed" bulletin, XML tags are in English while the data is in Traditional Chinese (Big 5). As not all parsers can manipulate XML documents with Traditional Chinese markup tags, a "Mixed" version is provided to facilitate processing of the XML documents that contain data in Traditional Chinese.
 
8. Why is there no XML Schemas listed for the "Mixed" weather bulletins?
As XML tags in the "Mixed" weather bulletins are in English, they are validated against the XML schema for the English bulletins.
 
 
 
[Index page of Hong Kong Obersvatory]
[Top]
chinese version faq related documents related links home version 2.07