TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Daniel Golan
NA
45
47.6k
Xml Attributes
Dec 16 2010 1:04 PM
Hello, i have this code which reades the nodes and then populates a combolist. Could someone help me do the same with attributes ? :)
// Code
private void populateCombo()
{
cmbPlatform.Items.Clear();
XmlDocument doc = new XmlDocument();
doc.Load("C:/Users/Daxal/Desktop/example/VideoGames.xml");
XmlNodeList nodeList = doc.SelectNodes("TGames/Game");
foreach(XmlNode node in nodeList)
if (!cmbPlatform.Items.Contains(node.SelectSingleNode("Name").InnerText))
cmbPlatform.Items.Add(node.SelectSingleNode("Name").InnerText);
}
Reply
Answers (
12
)
Reading xml
Read xml error