Free for PREMIUM members
Go Premium for a chance to win a PS4. Enter to Win
Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
private void button1_Click(object sender, EventArgs e)
// read all book elements
XmlDocument doc = new XmlDocument();
XmlNodeList bookdetails = doc.GetElementsByTagName("bookdetails");
// For each book oget a name and print it; any other book elements can be accessed here
foreach (XmlNode book in bookdetails)
XmlNode nameNode = book.SelectSingleNode("./name"); // we suggest only one name element exists for a book
System.Diagnostics.Debug.WriteLine("Name = " + nameNode.InnerText); // see output window
Open in new window
I believe it is better to get book nodes ("bookdetails") and check any children like "name" elements, because books may have other elements like "author", ISBN", "publisher" etc.
XmlNodeList names = doc1.SelectNodes("//bookdetails/name");
Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.