Rick Freeman

Rick Freeman

  • NA
  • 30
  • 8.3k

Xml data

Sep 2 2015 8:14 PM
My xml doc is returned with these two elements that are effecting the query:
<league xmlns="http://feed.elasticstats.com/schema/basketball/schedule-v2.0.xsd" id="4353138d-4c22-4396-95d8-5f587d2df25c" name="NBA" alias="NBA">
<season-schedule id="5ddc217a-a958-4616-9bdf-e081022c440b" year="2013" type="REG">
  <games>
    <game > ect...
Since were using xdoc.Descendants("game") I should be able to query the doc even if these elements are included, however I get a null...
 
The class also includes a "root" reference:
[Serializable]
[XmlRoot("game"), XmlType("game")]
public class Games
{
 
 When I remove the two elements the query works!

Answers (7)