I have a problem. I want to retrieve all the title attributes from the [array key] node
You can view the XML here http://api.ustream.tv/xml/user/socaldavis/...7fescmekvx35f3q
The method I have below is only returning on value. When I know there are three! Can anyone help me with this? I am not all that good with XPath Syntext.
public string GetChannelList()
{
XmlDocument xdoc = new XmlDocument();
xdoc.Load("http://api.ustream.tv/xml/user/socaldavis/listAllChannels?key=kdbkes7hh7fescmekvx35f3q");
XmlElement root = xdoc.DocumentElement;
//I do this because using "array key=*" throws an invalid token error
XmlNodeList nodes = root.SelectNodes("//xml//results//node()");
foreach (XmlNode theNode in nodes)
{
string data = theNode["title"].InnerText;
frmMain.lstResults.Items.Add(data);
return data;
}
return null;
}
Aqua-Soft Forums