title: How to read XML into a class/classes that matches its xsd
body: <p>So I have an XSD and a webservice that delivers in that same format. </p>
  
  <p>Now I could go ahead and read the xml into a document, create my objects from the class etc... But I am thinking, there must be some easier way to do that. </p>
  
  <p>Am I right? ;)</p>
  
  <ul>
  <li><a href="http://api.local.yahoo.com/MapsService/V1/GeocodeResponse.xsd" rel="nofollow noreferrer">Yahoo Maps GeocodeResponse XSD</a></li>
  <li><a href="http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&amp;street=One%20Microsoft%20way1&amp;city=redmond&amp;state=washington" rel="nofollow noreferrer" title="Yahoo GeocodeResponse">Yahoo Maps GeocodeResponse sample</a></li>
  </ul>
  
  <p><code></p>
  
  <pre><code>&lt;ResultSet xsi:schemaLocation="urn:yahoo:maps http://api.local.yahoo.com/MapsService/V1/GeocodeResponse.xsd"&gt;
   &lt;Result precision="address"&gt;
    &lt;Latitude&gt;47.643727&lt;/Latitude&gt;
    &lt;Longitude&gt;-122.130474&lt;/Longitude&gt;
    &lt;Address&gt;1 Microsoft Way, #Way1&lt;/Address&gt;
    &lt;City&gt;Redmond&lt;/City&gt;
    &lt;State&gt;WA&lt;/State&gt;
    &lt;Zip&gt;98052-6399&lt;/Zip&gt;
    &lt;Country&gt;US&lt;/Country&gt;
   &lt;/Result&gt;
  &lt;/ResultSet&gt;
  </code></pre>
  
  <p></code></p>
  
  <p>Below are auto-generated classes (two actually), using <a href="https://stackoverflow.com/questions/87621/how-do-i-map-xml-to-c-objects">xsd.exe</a></p>
  
  <p><a href="https://i.stack.imgur.com/KeUAz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KeUAz.png" alt="class diagram"></a>
  </p>