public void ListTeams(string sContents)
        {
            XmlDocument oDoc = new XmlDocument();

            oDoc.LoadXml(sContents);
            XmlElement          oRootNode = (XmlElement)oDoc.ChildNodes[1];
            XmlNamespaceManager nsmgr     = new XmlNamespaceManager(oDoc.NameTable);

            nsmgr.AddNamespace("yahoo", "http://fantasysports.yahooapis.com/fantasy/v2/base.rng");
            XmlElement oTeams = (XmlElement)oRootNode.SelectSingleNode("descendant::yahoo:league/yahoo:teams", nsmgr);

            if (oTeams != null)
            {
                m_aTeams.Clear();
                XmlNodeList oList = oTeams.SelectNodes("descendant::yahoo:team", nsmgr);
                foreach (XmlElement myElement in oList)
                {
                    YahooTeam  myTeam = new YahooTeam();
                    XmlElement oNode  = (XmlElement)myElement.SelectSingleNode("descendant::yahoo:team_id", nsmgr);
                    myTeam.TeamID   = Convert.ToInt32(oNode.InnerText);
                    oNode           = (XmlElement)myElement.SelectSingleNode("descendant::yahoo:name", nsmgr);
                    myTeam.TeamName = oNode.InnerText;
                    m_aTeams.Add(myTeam);
                }
            }
        }
 public void ListTeams(string sContents)
 {
     XmlDocument oDoc = new XmlDocument();
     oDoc.LoadXml(sContents);
     XmlElement oRootNode = (XmlElement)oDoc.ChildNodes[1];
     XmlNamespaceManager nsmgr = new XmlNamespaceManager(oDoc.NameTable);
     nsmgr.AddNamespace("yahoo", "http://fantasysports.yahooapis.com/fantasy/v2/base.rng");
     XmlElement oTeams = (XmlElement)oRootNode.SelectSingleNode("descendant::yahoo:league/yahoo:teams", nsmgr);
     if (oTeams != null)
     {
         m_aTeams.Clear();
         XmlNodeList oList = oTeams.SelectNodes("descendant::yahoo:team", nsmgr);
         foreach (XmlElement myElement in oList)
         {
             YahooTeam myTeam = new YahooTeam();
             XmlElement oNode = (XmlElement)myElement.SelectSingleNode("descendant::yahoo:team_id", nsmgr);
             myTeam.TeamID = Convert.ToInt32(oNode.InnerText);
             oNode = (XmlElement)myElement.SelectSingleNode("descendant::yahoo:name", nsmgr);
             myTeam.TeamName = oNode.InnerText;
             m_aTeams.Add(myTeam);
         }
     }
 }