/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System.Xml/XmlDocument/Overview/csharp/source1.cs
21 строка
470 B
Genevieve Warren
Remarks from System.Xml* types (#38946)
03 янв 2024, 21:01
Не верифицирован
03 янв 2024, 21:01
eeaee26
Код
Авторство
О чём код?
// <Snippet1> using System; using System.Xml; public class Sample1 { public static void Main() { //Create the XmlDocument. XmlDocument doc = new XmlDocument(); doc.Load("books.xml"); //Display all the book titles. XmlNodeList elemList = doc.GetElementsByTagName("title"); for (int i = 0; i < elemList.Count; i++) { Console.WriteLine(elemList[i].InnerXml); } } } // </Snippet1>