The XML datagrams exchanged between clients and servers on the Internet become even more interesting when the content of the XML datagram is generated dynamically in response to each request. This allows a server to provide an interesting web service, returning datagrams that can answer questions like these:
<?xml version="1.0"?>
<RestaurantList>
<Restaurant Name="Brasserie Savoy" Phone="415-123-4567"/>
</RestaurantList>
When is Lufthansa Flight 458 expected to arrive at SFO today?
<?xml version="1.0"?>
<FlightArrival Date="06-05-2000">
<Flight>
<Carrier>LH</Carrier>
<Arrives>SFO</Arrives>
<Expected>14:40</Expected>
</Flight>
</FlightArrival>
What is the status of the package with tracking number 56789?
<?xml version="1.0"?>
<TrackingStatus PackageId="56789">
<History>
<Scanned At="17:45" On="06-05-2000" Comment="Williams
Sonoma Shipping"/>
<Scanned At="21:13" On="06-05-2000" Comment="SFO"/>
<Scanned At="04:13" On="06-06-2000" Comment="JFK"/>
<Scanned At="06:05" On="06-06-2000" Comment="Put on
truck"/>
<Delivered At="09:58" On="06-06-2000" Comment="Received by
Jane Hubert"/>
</History>
</TrackingStatus>
<RestaurantList>
<Restaurant Name="Brasserie Savoy" Phone="415-123-4567"/>
</RestaurantList>
When is Lufthansa Flight 458 expected to arrive at SFO today?
<?xml version="1.0"?>
<FlightArrival Date="06-05-2000">
<Flight>
<Carrier>LH</Carrier>
<Arrives>SFO</Arrives>
<Expected>14:40</Expected>
</Flight>
</FlightArrival>
What is the status of the package with tracking number 56789?
<?xml version="1.0"?>
<TrackingStatus PackageId="56789">
<History>
<Scanned At="17:45" On="06-05-2000" Comment="Williams
Sonoma Shipping"/>
<Scanned At="21:13" On="06-05-2000" Comment="SFO"/>
<Scanned At="04:13" On="06-06-2000" Comment="JFK"/>
<Scanned At="06:05" On="06-06-2000" Comment="Put on
truck"/>
<Delivered At="09:58" On="06-06-2000" Comment="Received by
Jane Hubert"/>
</History>
</TrackingStatus>