Reading XML using HttpWebRequest

The services we used in the first two recipes of this chapter were self-describing services. By this we mean that the service itself exposes information about its methods and data types by means of a WSDL file.

However, often we might need to access data that is not exposed by such a service. For example, we may need to read out XML data. This data could be available as a physical file on the server. It could perhaps be dumped by a process on a specific location. Alternatively, while sending a request to a specific URL, some services such as REST services return XML data. Communicating with REST services is the topic of Chapter 8.

Whether the XML comes from a REST service or lives in a file on the server, reading ...

Get Silverlight 4 Data and Services Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.