Tryit Editor v1.4. XPath Tutorial. Parse XML with PHP5 - PaulStamatiou.com. One of the most common things web coders run into is the need to parse some type of XML file. Many web services return API calls in XML format, so it's just handy to know how to parse these results quickly. With PHP4 you usually have to rely on some large parsing library to get the job done or deal with overly complicated PHP functions, but PHP 5 has a great extension called SimpleXML.
When I say parsing XML, I'm talking about navigating through XML markup to return data of interest. For example, let's take a look at the Yahoo! Geocoding API. With the geocoding API you can call a specially crafted request URL with parameters, such as city and state, to receive latitude and longitude coordinates which come in handy when creating mapping mashups. Here is an example call to the geocoding service to get the latitude and longitude of Atlanta, GA. This is the XML output for that call: Typical SimpleXML Usage var_dump(xml); Wrapup. The Sports Markup Language. SportsML is the only open, global XML standard for the interchange of sports data. Designed to be as easy to understand and implement as possible, SportsML allows for the exchange of sports scores, schedules, standings, and statistics for a wide variety of sports competitions. SportsML Features Covers scores, schedules, standings, statistics, and more Global in scope and design Common framework for all sports Plug-in modules for specific sports Well documented and easy to use Open and non-proprietary: Your feedback is welcome!
In Brief Its extensibility allows for the easy accommodation of many sports from around the globe. SportsML uses the eXtensible Markup Language to define the content and structure of sports data, which means that developers of interactive or printed sports data services will have a far easier time integrating sports feeds that adhere to SportsML than if they rely on other proprietary formats. SportsML 2.2 Released NEW G2-Guidelines.