2010-04-06

Use XQuery

XQuery allows programmer to save the xml-query (or filter) into a seperated Python-like file, e.g
for $time in doc("forecast.xml")//tabular/time
      return <time>
          { $time/@from }
          <temperature>
              { $time/temperature/@value, $time/temperature/@unit }
          </temperature>
             </time>

A nice artical demonstrating the usage of XQuery is published in Qt Quaterly: Checking the Weather with XQuery(http://qt.nokia.com/developer/qtquarterly/checking-the-weather-with-xquery)

Reference:

No comments:

Post a Comment