Click here to Skip to main content
12,299,285 members (57,485 online)
Click here to Skip to main content

Tagged as


1 bookmarked

Reading XML documents using LINQ

, 18 Jan 2011 CPOL
Another option would be to use the Elements extension method[^]:var root = XElement.Load("Books.xml"); var books = from node in root.Elements("Book").Elements("Subject") select node.Value.Trim(); foreach (string subject in books){ listBox1.Items.Add(subject);}



Compare Revision Minor Date Status Editor
1 - publicly available No 18-Jan-11 15:16 Available Richard Deeming


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Richard Deeming
Software Developer Nevalee Business Solutions
United Kingdom United Kingdom
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160525.2 | Last Updated 18 Jan 2011
Article Copyright 2011 by Richard Deeming
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid